I’m trying to get all the data out of a chunk of xml so i wrote this code:
for (var i:uint; i < infoGroup.length(); i++) {
trace(infoGroup.@sectionName*);
for (var j:uint; j<infoGroup*.infoPoint.length(); j++) {
trace(infoGroup*.infoPoint[j].infoText.text());
trace(infoGroup*.infoPoint[j].infoRef.text());
}
trace("-end of section-");
}
How ever the second for loop is only run once, Why is that? Here is the output and the xml.
background
This is some information regarding the background of whatever I am talking about in the XML file
This is simply a text part
-----end of section-----
main Information
-----end of section-----
Misc Information
-----end of section-----
<infoGroup sectionName="background">
<infoPoint>
<infoText>This is some information regarding the background of whatever I am talking about in the XML file</infoText>
<infoRef>http://www.google.com</infoRef>
</infoPoint>
<infoPoint>
<infoText>This is simply a text part</infoText>
<infoRef>http://www.ask.com</infoRef>
</infoPoint>
</infoGroup>
<!-- the other section have the same format! -->
Its easy to see from the out put that the second for loop is only run once =[