var xmlloader:URLLoader = new URLLoader();
xmlloader.addEventListener(Event.COMPLETE, handleComplete);
xmlloader.load(new URLRequest("test.xml"));
var theXML:XML = new XML();
theXML.ignoreWhitespace = true;
function handleComplete(e:Event){
theXML = XML(e.target.data);
var itemList:XMLList = theXML.child("*");
for each (var _item:XML in itemList) {
trace(_item.title.toString());
trace(_item.description.toString());
}
}
No comments:
Post a Comment