[RESOLVED] Finding only base nodes of an XML file
Hello, I have an xml file with various nodes and want to get first nodes of it, not children. Here's my code:
Code:
function processXML(event:Event):void {
menu_xml = new XML(event.target.data);
trace (menu_xml.child("mainmenu"));
}
This code doesn't output anything. I'm using Flash Professional CC 2015.0.
Here's the xml content:
Code:
<?xml version="1.0"?>
<mainmenu>
<home/>
<portfolio/>
<contact/>
<friends>
<joe/>
<karen/>
<bob/>
</friends>
</mainmenu>