You might be aware of this, but just an FYI, if you're concerned about attributes being order specific. When you loop through the attributes with a for statement, you'll get the attributes in the reverse order. I personally loop through the attributes and push the attribute name to an array and then reverse order, when the for is done.
Andrew -----Original Message----- From: Carl Welch [mailto:[EMAIL PROTECTED] Sent: Thursday, March 15, 2007 3:04 AM To: [email protected] Subject: Re: [Flashcoders] xml parse question Nevermind. I found this in one of my many flash books: myAttributes = this.firstChild.childNodes[0].childNodes[0].attributes; for(attributes in myAttributes){ trace(attributes+" : "+myAttributes[attributes]); } On 3/14/07, Carl Welch <[EMAIL PROTECTED]> wrote: > What if I don't know what the names are going to be? How can I check > how many attributes are in a node? is there anything like > <XMLNode>.attributes.length (I know that's wrong...) so I can loop > through and find out their names? > > -- > Carl Welch > http://www.carlwelch.com > [EMAIL PROTECTED] > > On 3/14/07, Andrew Wright <[EMAIL PROTECTED]> wrote: > > <XMLNode>.attributes.imageID > > <XMLNode>.attributes.img > > <XMLNode>.attributes.text > > > > etc > > > Hi coders, > > > > > > I just started working on a new project that is requiring me to handle > > > an xml format that I haven't had to deal with yet. > > > > > > Here is an example of what it looks like: > > > > > > <image imageID="halLogin" img="hal.png" text="" > > > Font="Black,8,Regular,AlignLeft" onPanel="true" xPos="0.25" > > > yPos="0.112" /> > > > > > > I'm used to parsing xml that looks like this: > > > > > > <something> > > > <blah>"foo"</blah> > > > </something> > > > > > > How do I parse xml that looks like the first example with multiple > > > values inside of a single node? > > > > > > Thanks. > > > > _______________________________________________ > > [email protected] > > To change your subscription options or search the archive: > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > Brought to you by Fig Leaf Software > > Premier Authorized Adobe Consulting and Training > > http://www.figleaf.com > > http://training.figleaf.com > > > -- Carl Welch http://www.carlwelch.com [EMAIL PROTECTED] 805.403.4819 _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

