I get "value is not a function" - I guess because toLowerCase() cannot work on an XMLList. You would have to do:
rootXML.group.(name.text()[0].toLowerCase()=="fred"&&name.text()[0].toLowerCase()=="bob") which, like you say, would always return nothing. Or you have to specify group elements with exactly one child name element. Daniel Freiman wrote: > > I think you'd actually be matching "fred" against the first item in the > list, which would means that the entire expression would always return > false > because the first item can't be both "bob" and "fred". > > On Mon, Sep 22, 2008 at 11:05 AM, Mark Carter <[EMAIL PROTECTED]> > wrote: > >> >> That doesnt work for me. Arent you trying to match "fred" against the >> lowercased name.text() XMLList? >> >> >> xitij2000 wrote: >> > >> > i performed a similar operation by doing: >> > >> rootXML.group.(name.text().toLowerCase()=="fred"&&name.text().toLowerCase()=="bob") >> > >> > the toLowerCase is just because i needed case insensitivity... >> > >> > >> > --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>, >> "Daniel Freiman" <[EMAIL PROTECTED]> wrote: >> >> >> >> 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. >> >> > >> >> > >> >> > >> >> >> > >> > >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/e4x-problem---filtering-elements-based-on-multiple-child-conditions-tp19604364p19609869.html >> Sent from the FlexCoders mailing list archive at Nabble.com. >> >> >> > > -- View this message in context: http://www.nabble.com/e4x-problem---filtering-elements-based-on-multiple-child-conditions-tp19604364p19610549.html Sent from the FlexCoders mailing list archive at Nabble.com.