Hi.
I am trying to load a generated xml-string from php into Flash via AS3.
(For reference, the xml may be found here: http://pieceoflunacy.com/abydos/flash/PHP/000testing.php )
The code I use is pretty obvious:
var xmlLoader:URLLoader = new URLLoader ;
var xmlData:XML = new XML ;
xmlLoader.addEventListener(Event.COMPLETE,LoadXML);
xmlLoader.load(new URLRequest('http://pieceoflunacy.com/abydos/flash/PHP/000testing.php'));
function LoadXML(e:Event):void {
xmlData = new XML(e.target.data);
trace(xmlData);
}
All XML is traced correctly. But then I substitute
trace(xmlData);
with
trace(xmlData.phpDirectory);
.
I would now assume to get all children-phpDirectorys. But nothing is output, not even an error.
So, I wonder, whats the mistake? Can AS3-XML not parse nested elements of same type? Or did I miss anything?