Actionscript 3 XML get node name

spartan1123

New Member
This is my XML, I want to dynamically get the node/tag name (ex: wa, or, ca).\[code\]<root> <wa title='someValue'> </wa> <or title='val'> <data >ss</data> <data>sss</data> </or> <ca title='val'> <data>xyz</data> </ca></root>\[/code\]the following is working but it gives only root node name\[code\]for each (var item:XML in xml) { trace (item.name());}\[/code\]the following one is going thought each element under root but not giving the node name\[code\]for each(var itemData:XML in xml.elements()) { trace ("itemCount " + itemData.name);}\[/code\]Please advise to get the node name under root
 
Back
Top