I am working in flex builder 3 with an XMLListCollection and have run into this (should be simple) parsing snag...
The XMLListCollection Data:
<data>
<term name="NUMBERS">
<alt_form name="1"/>
</term>
<term name="LETTERS">
<alt_form name="A"/>
<alt_form name="B"/>
<alt_form name="C"/>
</term>
</data>
The AS Function:
private function interateThroughXML(myList:XMLListCollection):void {
for each (var node : XML in myList){
trace(node.@name + " is my list item name");
if (node.alt_form.@name != null) {
trace(node.alt_form.@name + " is my list SUB item name");
}
}
}
The Output:
NUMBERS is my list item name
1 is my list SUB item name
LETTERS is my list item name
ABC is my list SUB item name
Note that the three subnode name values have been concatenated as "ABC". What do I need to do differently in order to capture the sub-item name values (A, B, and C) individually?