try this:
rootXML.group.(name.text().contains("fred") && name.text().contains("bob"))
- Daniel Freiman
On Mon, Sep 22, 2008 at 5:20 AM, Mark Carter <[EMAIL PROTECTED]> wrote:
>
> Ok, that subject is a bit vague but here's an example of what I mean:
>
> <group id="1">
> <name>fred</name>
> <name>bob</name>
> <name>peter</name>
> </group>
>
> Say we have lots of these group elements in an XML document. I want to
> select all groups including the names "fred" and "bob", for example. Is it
> possible in one e4x expression?
>
> My guess would be: rootXML.group.name.(text() ==
> "fred").parent().name.(text() == "bob").parent()
>
> but the parent() part seems to be wrong.
>
> Any ideas???
>
> On a slightly different note...
>
> I notice that rootXML.group.(name == "fred") will only work for a group
> containing fred and nothing else. Using rootXML.group.name.(text() ==
> "fred") sort of gives me what I want, but I really want the parent()
> elements. Of course, I could iterate over the results but I really want to
> do this in one expression.
> --
> View this message in context:
> http://www.nabble.com/e4x-problem---filtering-elements-based-on-multiple-child-conditions-tp19604364p19604364.html
> Sent from the FlexCoders mailing list archive at Nabble.com.
>
>
>