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>
>
>
>