title: Nokogiri: ids Vs hierarchy xpath performance
body: <p>I have to write down the xml schema for a dataset which is hierarchically organized. It has to be parsed by Nokogiri for information retrieval. My question is, under a performance point of view, is it better to respect the hierarchy or to flatten it? 
  E.g.</p>
  
  <pre><code>&lt;item_1 id="id_1"&gt;
    &lt;item_2 id="id_2"&gt;value&lt;/item_2&gt;
  &lt;/item_1&gt;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&lt;item id_1="id_2" id_2="id_2"&gt;value&lt;/item&gt;
  </code></pre>
  
  <p>I know that multiple attributes should be avoided as far as readability and maintainability are concerned, but performance is my priority.</p>