title: jquery to retrieve a top level xml node
body: <p>I have tried to retrieve the top level 'label' attribute from the following xml using jquery, and having parsed it into a DOM object with no luck. Any suggestions on how I can do this ? I've tried using children(),parent() functions with no luck - I get either no result, or end up having all instances of the label tags passed back to me.</p>
  
  <p>jquery:</p>
  
  <pre><code>xml = $.parseXML(xmlString);
  $xml = $(xml);
  </code></pre>
  
  <p>I traverse fields via <code>$($xml).find('fields').each(function(){</code> etc...
  but cannot get that top level <code>label</code> data!</p>
  
  <pre><code>&lt;customobject&gt;
      &lt;label&gt;want this content&lt;/label&gt;
      &lt;fields&gt;
          &lt;label&gt;foo&lt;/label&gt;
          &lt;attr1&gt;&lt;/attr1&gt;
          &lt;attr2&gt;&lt;/attr2&gt;
      &lt;/fields&gt;
      &lt;fields&gt;
          &lt;label&gt;foo2&lt;/label&gt;
          &lt;attr1&gt;&lt;/attr1&gt;
          &lt;attr2&gt;&lt;/attr2&gt;
      &lt;/fields&gt;
  &lt;/customobject&gt;
  </code></pre>