i did the following
for each (var a:Object in [EMAIL PROTECTED])
{
trace (a.name());
trace (a.toXMLString());
}
a.name doesn't trace anything. a.toXMLString() traces the attribute
value. so we're half way their.
--- In [email protected], "bhaq1972" <[EMAIL PROTECTED]> wrote:
>
> Hi Werner. Thanks the suggestion. I wasn't able to run this
because
> i'm getting a "access to undefined property 'a'" compile error
>
>
> --- In [email protected], "Werner Sharp" <wsharp@> wrote:
> >
> > How about this...
> >
> >
> >
> > var xml1:XML = <Node1 a='b' c='d' e='f' g='h'/>
> >
> >
> >
> > for each (a in [EMAIL PROTECTED])
> >
> > {
> >
> > trace (a.name());
> >
> > trace (a.toXMLString());
> >
> > }
> >
> >
> >
> >
> >
> > ________________________________
> >
> > From: [email protected]
> [mailto:[EMAIL PROTECTED] On
> > Behalf Of bhaq1972
> > Sent: Monday, April 10, 2006 8:31 AM
> > To: [email protected]
> > Subject: [flexcoders] Flex2B2 simple question regarding xml
> attributes
> >
> >
> >
> > i can't find what i'm looking for in the docs. i need help
> >
> > All i want to do is iterate over an xml node's attributes.
> >
> > XML.attributes() returns a list of all the attributes, but this
is
> > only half of what i want. i want the attribute names as well.
> >
> > var xml1:XML = <Node1 a='b' c='d' e='f' g='h'/>
> >
> > i want the value 'a' and 'b' and 'c' and 'd' etc via a loop
> >
> > regards
> > bod
> >
> >
> >
> >
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ:
> http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> >
> >
> >
> >
> > ________________________________
> >
> > YAHOO! GROUPS LINKS
> >
> >
> >
> > * Visit your group "flexcoders
> > <http://groups.yahoo.com/group/flexcoders> " on the web.
> >
> > * To unsubscribe from this group, send an email to:
> > [EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]
> subject=Unsubscribe>
> >
> > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > Service <http://docs.yahoo.com/info/terms/> .
> >
> >
> >
> > ________________________________
> >
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/