sweet - thanks ________________________________________ From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of allandt bik-elliott (thefieldcomic.com) [alla...@gmail.com] Sent: Monday, November 08, 2010 9:25 AM To: Flash Coders List Subject: Re: [Flashcoders] Counting xml attributes
no worries var listAtt:XMLList = myxml.t...@*; var noOfAtt:int = listAtt.length(); var att:XML; for (var i:int = 0; i < noOfAtt; i++) { att = listAtt[i]; trace(att.name().toString() + " = " + att); // note leaving .toString() off will result in @a, @b and @c rather than a, b, c } best a On 8 November 2010 14:17, Lehr, Theodore <ted_l...@federal.dell.com> wrote: > Thanks - that gives me the values of the attribs - but not the attrib > names: > > if I have: > > <tag a="1" b="2" c="3"/> > > I am getting: 1,2,3 I am trynig to get: a,b,c > > Anyway to do that? > > ________________________________________ > From: flashcoders-boun...@chattyfig.figleaf.com [ > flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of allandt > bik-elliott (thefieldcomic.com) [alla...@gmail.com] > Sent: Monday, November 08, 2010 9:00 AM > To: Flash Coders List > Subject: Re: [Flashcoders] Counting xml attributes > > oops > var listAttribs:XMLList = myxml.t...@*; > var noOfAttribs:int = listAttribs.length(); > var attrib:XML; > for (var i:int = 0; i < noOfAttribs; i++) > { > attrib = listAttribs[i]; > } > > On 8 November 2010 13:58, allandt bik-elliott (thefieldcomic.com) < > alla...@gmail.com> wrote: > > > yep > > > > var listAttribs:XMLList = myxml.t...@*; > > trace(listAttribs.length()); > > > > best > > a > > > > > > On 8 November 2010 13:42, Lehr, Theodore <ted_l...@federal.dell.com > >wrote: > > > >> Is there a way to return the attributes name of an xml node? > >> > >> So if I have: > >> > >> <tag a="1" b="2" c="3"/> > >> > >> I would get back: > >> > >> a, b, c > >> > >> _______________________________________________ > >> Flashcoders mailing list > >> Flashcoders@chattyfig.figleaf.com > >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > >> > > > > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders