Thanks Tracy,

Thats exactly what I ended up doing,
1. Clone the original collection
2. get XMLList of the nodes that I dont want
3. Delete them

-sxm

--- In [email protected], "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> That is a tough one.  It is more of a transformation than a selection.
> 
>  
> 
> If you can't do it directly, consider using the selection expression to
> return the nodes you do NOT want, then deleting them from the XML.
> 
>  
> 
> Tracy
> 
>  
> 
> ________________________________
> 
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Shailesh Mangal
> Sent: Wednesday, January 24, 2007 8:13 PM
> To: [email protected]
> Subject: [flexcoders] e4x - attribute based selector
> 
>  
> 
> All,
> 
> I have a following xml structure retrieved from server
> <root>
> <parent name="good">
> <child name="abc"/>
> <child name="cba"/>
> <child name="abc"/>
> </parent>
> <parent name="notGood">
> <child name="abc"/>
> <child name="def"/>
> <child name="fed"/>
> </parent>
> </root>
> 
> and I want to make a selection based on the attribute of child. e.g.
> for child with name "abc", get a result as..
> <root>
> <parent name="good">
> <child name="abc"/>
> <child name="abc"/>
> </parent>
> <parent name="notGood">
> <child name="abc"/>
> </parent>
> </root>
> 
> I tried following, 
> result..child.(@name=="abc")
> result.root.parent.child.(@name=="abc")
> but I end up getting following 
> <child name="abc">
> <child name="abc">
> <child name="abc">
> 
> Any suggestions?
> sxm
>


Reply via email to