Posted by Sankar.G | Posted in AS3 | 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
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)
Post a Comment