title: xpath to fetch child items with the same tag name as parent
body: <p>My requirement is to fetch the value of attributes of child tags which have the same name parent.
  Following is the XML structure like:</p>
  
  <pre><code>&lt;A&gt;
      &lt;B ID="id"&gt;
          &lt;B parentID="id" .. other attributes&gt;
          &lt;B parentID="id" .. other attributes&gt;
          &lt;B parentID="id" .. other attributes&gt;
          &lt;B parentID="id" .. other attributes&gt;
      &lt;/B&gt;
  &lt;/A&gt;
  </code></pre>
  
  <p>I am expecting to fetch the attribute values of all childs B tags under parent B tag.</p>
  
  <p>Thanks</p>