I think it's var yourFilteredXMLList:XMLList = yourXML.descendants().(@id==3);
that you want (all nodes where a doc id == 3). but I've not run it up, so might be wildly out. Have a look here : http://mimswright.com/blog/?p=141 it's what I read when I need a refresher on e4x (All too often, I'm afraid :( ). -----Original Message----- From: [email protected] on behalf of Dominique Bessette - Halsema Sent: Mon 28/01/2008 23:09 To: [email protected] Subject: Re: [flexcoders] How would I write this query in e4x you want to do something like this, but basically your going to have to create an xml or xmllist object and then after check out the object in the debugger and find the node/attribute you are looking for. it will tell you what to put in your code ie. childNode/firstChild/lastChild/attribute try{ var xlist:XMLList = new XMLList(myXML); if(xlist != null || xlist.length() != 0){ //look at xlist in debugger if(xlist.firstNodeName.secondNodeName.(@id) == 3) //do whatever } } On 1/28/08, Sherif Abdou <[EMAIL PROTECTED]> wrote: > > well this might be horrible but it gets the job done, so i'd wait one > some other to chime in but > > myXML..children().children().children().(@id==3).toXMLString() > > > > ----- Original Message ---- > From: madflexcoder <[EMAIL PROTECTED]> > To: [email protected] > Sent: Monday, January 28, 2008 3:59:13 PM > Subject: [flexcoders] How would I write this query in e4x > > > I want to get an xmllist of nodes that contain a doc with a specific id. > > for example all nodes where a doc id == 3. > > My data structure is roughly as follows. > > <nodes> > <node> > <doc id="1" /> > <doc id="2" /> > </node> > <node> > <node> > <doc id="3" /> > <doc id="4" /> > </node> > <node> > <doc id="5" /> > <doc id="6" /> > </node> > </node> > </nodes> > > > > > ------------------------------ > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it > now.<http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ> > > > ______________________________________________________________________ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. ______________________________________________________________________
<<winmail.dat>>

