Declare XML variable
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
import mx.controls.Alert;
public function checkP():void{
var myString:String = "AAA";
var myInt:int = -2;
var myUint:uint = 2;
var myNumber:Number = 2.2;
var myXML:XML = <root><node></node></root>;
var myObj:Object = {x:1,y:2,z:3};
var myArray:Array = ["item1","item2","item3"];
var myBool:Boolean = false;
}
</mx:Script>
<mx:Button label="Check" click="checkP()" />
</mx:Application>
Related examples in the same category