title: jQuery to get matching nodes in XML
body: <p>A little background: I was rendering some XML on the page using XSLT, but we decided to make it more interactive and so now I'm doing a jQuery.ajax call to return the XML, and I'm parsing it in JavaScript.</p>
  
  <p>I've been able to extract particular nodes from it using code like</p>
  
  <pre><code>var qpPlanNode = $(xml).find('MyNode'); 
  var qpPlanNum = $(qpPlanNode).children('PLANNUM').text();
  </code></pre>
  
  <p>And that gets the plan number into qpPlanNum.  But in that XML I have something like</p>
  
  <pre><code>&lt;xml&gt;
    &lt;MyNode&gt;
      &lt;PLANNUM&gt;123&lt;/PLANNUM&gt;
      &lt;SOURCE&gt;
        &lt;TYPE&gt;PreTax&lt;/TYPE&gt;
        &lt;AMOUNT&gt;1234&lt;/AMOUNT&gt;
      &lt;/SOURCE&gt;
      &lt;SOURCE&gt;
        &lt;TYPE&gt;AfterTax&lt;/TYPE&gt;
        &lt;AMOUNT&gt;456&lt;/AMOUNT&gt;
      &lt;/SOURCE&gt;
      &lt;SOURCE&gt;
        &lt;TYPE&gt;PreTax&lt;/TYPE&gt;
        &lt;AMOUNT&gt;234&lt;/AMOUNT&gt;
      &lt;/SOURCE&gt;
    &lt;/MyNode&gt;
  &lt;/xml&gt;
  </code></pre>
  
  <p>I would like to extract all the SOURCE nodes that have a particular value for TYPE.  I can't find a simple jQuery selector that that will do that.  In XSLT, I was doing <code>&lt;xsl:variable name="afterTaxSources" select="SOURCE[TYPE = 'AfterTax']"/&gt;</code>.  What's the JQuery equivalent?</p>