Hi All,
Say we have the following XML:
<people>
<person>
<name>Jake</name>
<skills>
<skill>JavaScript</skill>
<skill>HTML</skill>
<skill>Flex</skill>
<skill>CSS</skill>
</skills>
</person>
<person>
<name>John</name>
<skills>
<skill>C++</skill>
<skill>Foxpro</skill>
</skills>
</person>
<person>
<name>Josh</name>
<skills>
<skill>JavaScript</skill>
<skill>XML</skill>
<skill>Flex</skill>
</skills>
</person>
</people>
What I want to be able to do with E4X is find all person objects that match a list/array of skills I pass it. So, say I want find all people with either HTML or JavaScript skills.
I know I can do:
people.person.(descendants("skill").contains("HTML"))
or
people.person.(descendants("skill").contains("JavaScript"))
But I really want (/need) to do it one line (it's part of a XMLListCollection filter function in Flex).
Something like this would be ideal
people.person.(descendants("skill").contains("HTML","JavaScript"))
Although I tried variations on that theme and got nowhere. What would be great would be:
people.person.(descendants("skill").in("HTML", "JavaScript"))
or something like that.
Anybody know if what I'm doing is possible?
I really want to avoid adding my own loops in there.
Jake