title: Can E4X Have An Array Passed To It?
body: <p>Say we have the following XML:</p>
  
  <pre><code>&lt;people&gt;
   &lt;person&gt;
    &lt;name&gt;Jake&lt;/name&gt;
    &lt;skills&gt;
     &lt;skill&gt;JavaScript&lt;/skill&gt;
     &lt;skill&gt;HTML&lt;/skill&gt;
     &lt;skill&gt;Flex&lt;/skill&gt;
     &lt;skill&gt;CSS&lt;/skill&gt;
    &lt;/skills&gt;
   &lt;/person&gt;
   &lt;person&gt;
     &lt;name&gt;John&lt;/name&gt;
     &lt;skills&gt;
      &lt;skill&gt;C++&lt;/skill&gt;
      &lt;skill&gt;Foxpro&lt;/skill&gt;
     &lt;/skills&gt;
   &lt;/person&gt;
   &lt;person&gt;
    &lt;name&gt;Josh&lt;/name&gt;
    &lt;skills&gt;
     &lt;skill&gt;JavaScript&lt;/skill&gt;
     &lt;skill&gt;XML&lt;/skill&gt;
     &lt;skill&gt;Flex&lt;/skill&gt;
    &lt;/skills&gt;
   &lt;/person&gt; 
  &lt;/people&gt;
  </code></pre>
  
  <p>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.</p>
  
  <p>I know I can do:</p>
  
  <pre><code>people.person.(descendants("skill").contains("HTML"))
  </code></pre>
  
  <p>or</p>
  
  <pre><code>people.person.(descendants("skill").contains("JavaScript"))
  </code></pre>
  
  <p>But I really want (/need) to do it one line (it's part of a XMLListCollection filter function in Flex).</p>
  
  <p>Something like this would be ideal</p>
  
  <pre><code>people.person.(descendants("skill").contains("HTML","JavaScript"))
  </code></pre>
  
  <p>Although I tried variations on that theme and got nowhere. What would be great would be:</p>
  
  <pre><code>people.person.(descendants("skill").in("HTML", "JavaScript"))
  </code></pre>
  
  <p>or something like that.</p>
  
  <p>Anybody know if what I'm doing is possible? </p>
  
  <p>I really want to avoid adding my own loops in there.</p>
  
  <p>Jake</p>