Okay, so the last post I put up was apparently a real poser, I'll ask a related question.
To access a node attribute in flash, we have to enter a string something along the lines of:
listItems(this.firstChild);
listItems(this.firstChild.nextSibling);
listItems(this.firstChild.nextSibling[2]);
Which can be quite a bit of code in the case of a listing of states and countries from an xml like:
US>
AL Title="Alabama" URL="http://Alabama"/>
AK Title="Alaska" URL="http://Alaska"/>
AR Title="Arkansas" URL="http://Arkansas"/>
AZ Title="Arizona" URL="http://Arizona"/>
/US>
EURO>
X Title="" URL="http://"/>
/EURO>
The intuitive naming of nodes in xml is great, but why do we then have to refer to them as lines and lines of:
listItems(this.firstChild.nextSibling[45]);
listItems(this.firstChild.nextSibling[46]);
listItems(this.firstChild.nextSibling[47]); ?
Can't we just say something like:
listItems(this.US.AL);
listItems(this.US.AK);
listItems(this.US.AR); and so on, using those intuitive node names?
I'm putting the node attributes into variables for a world map, lotsa states and countries.
Thanks!