Another approach that mitigates the risk posed by the xml structure changing (quite possible with a dynamic menu I reckon): siteNav.section.(@name=="theirs").subsection
bjh -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of thomas horner Sent: Friday, 28 August 2009 11:18 p.m. To: 'Flash Coders List' Subject: RE: [Flashcoders] just target children of particular node sorry worked it out - was easy and obvious - doh! for each (var section:XML in siteNav.section[3].subsection) { -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of thomas horner Sent: 28 August 2009 12:06 To: [email protected] Subject: [Flashcoders] just target children of particular node ok in the following xml how would i create a loop just from the children of "his" for each (var section:XML in siteNav.section.subsection) { <site> <section name="about" src="index/nav/about" keep="false"/> <section name="hers" src="index/nav/hers" keep="false" > <subsection name="small" src="index/nav/hers/smalltheirs" keep="true" /> <subsection name="medium" src="index/nav/hers/mediumtheirs" keep="true" /> <subsection name="large" src="index/nav/hers/largetheirs" keep="true" /> </section> <section name="his" src="index/nav/his" keep="false" > <subsection name="small" src="index/nav/his/smalltheirs" keep="true" /> <subsection name="medium" src="index/nav/his/mediumtheirs" keep="true" /> <subsection name="large" src="index/nav/his/largetheirs" keep="true" /> </section> <section name="theirs" src="index/nav/theirs" keep="false" > <subsection name="small" src="index/nav/theirs/smalltheirs" keep="true" /> <subsection name="medium" src="index/nav/theirs/mediumtheirs" keep="true" /> <subsection name="large" src="index/nav/theirs/largetheirs" keep="true" /> </section> <section name="contact" src="index/nav/contact" keep="true" /> </site> _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

