title: Get elements of specific hierarchy level
body: <p>Is there any way to retrieve all elements of specific hierarchy level using XPath?</p>
  
  <p>Upd.</p>
  
  <pre><code>&lt;A&gt;
     &lt;B&gt;1&lt;/B&gt;
     &lt;B&gt;2&lt;/B&gt;
  &lt;/A&gt;
  &lt;C&gt;
     &lt;D&gt;3&lt;/D&gt;
     &lt;D&gt;4&lt;/D&gt;
  &lt;/C&gt;
  </code></pre>
  
  <p>I need to retrieve all B and D elements (hierarchy level = 2)</p>