title: Jquery XML parsing
body: <p>I have an XML like this</p>
  
  <pre><code>&lt;resultGroups&gt; 
      &lt;subGroups&gt;
          &lt;results&gt; &lt;/results&gt;
          &lt;results&gt; &lt;/results&gt;
      &lt;/subGroups&gt;
      &lt;subGroups&gt;
          &lt;results&gt; &lt;/results&gt;
          &lt;results&gt; &lt;/results&gt;
      &lt;/subGroups&gt;    
      &lt;name&gt; &lt;/name&gt;
  &lt;/resultGroups&gt;
  &lt;resultGroups&gt; 
      &lt;subGroups&gt;
          &lt;results&gt; &lt;/results&gt;
          &lt;results&gt; &lt;/results&gt;
      &lt;/subGroups&gt;
      &lt;subGroups&gt;
          &lt;results&gt; &lt;/results&gt;
          &lt;results&gt; &lt;/results&gt;
      &lt;/subGroups&gt;    
      &lt;name&gt; &lt;/name&gt;
  &lt;/resultGroups&gt;
  </code></pre>
  
  <p>I have this code to select number of results inside each resultGroup</p>
  
  <pre><code>$('resultGroups', $(xml)).each(function() {
      count = $('results', this).length;
      arr[i] = count;
      i++;
  });
  </code></pre>
  
  <p>What I want is to get the name from each resultGroup tag and store it in an array.<br>
  How can I do that inside the above code?</p>
  
  <p>How can I select only the name tag of the first resultGroup only without .each function?</p>