title: Accessing repeated XML tags at differing hierarchy levels in JavaScript
body: <p>I have an XML file which uses the following hierarchy structure;</p>
  
  <pre><code>    item
          item
              (item details)
          item
              (item details)
      item
          item
              (item details)
          item
              (item details)
          item
              (item details)
  </code></pre>
  
  <p>etc..</p>
  
  <p>I want to be able to access each of the 'item' tags at the first level, and for each of those, access the 'item's within that (second level) and assign its details (third levels) to an individual object for each second level item. I can search using jQuery for each item tag, however this obviously goes through 'item' tags at both levels, rather than just the first level.</p>
  
  <p>How can I retrieve each first level item, and then use that as a reference to access the items within it (so each of the second level items are processed one at a time)?</p>
  
  <p>Tried to word this as clearly as possible, I don't like the reuse of the "item" tag but it's out of my control sadly.. Thanks.</p>