Flash actionscript 3.0: getting XML Datas from XML file in AS3.0

getting XML Datas from XML file in AS3.0

Posted by Sankar.G | Posted in | Posted on 3:49 PM

var url:URLLoader=new URLLoader();
var xml:XML=new XML();
url.addEventListener(Event.COMPLETE,one);
url.load(new URLRequest("one.xml"));

function one(e:Event):void
{
xml=new XML(e.target.data);
two(xml);
}
function two(xml2:XML)
{
var list:XMLList=xml2.Book.children();
for each (var xml3:XML in list)
{
trace(xml3);
}
}

one.xml is a xml file save the xml file in same folder with this file

Comments (0)