title: Java XML parsing using XPaths?
body: <p>Total newbie to XPath and Java here. What I'm attempting to do is something like this:</p>
  
  <pre><code>&lt;A&gt;
    &lt;B&gt;
     &lt;C&gt;test 1&lt;/C&gt;
    &lt;/B&gt;
    &lt;B&gt;
     &lt;C/&gt;test 2&lt;/C&gt;
    &lt;/B&gt;
    &lt;B&gt;
     &lt;C/&gt;test 3&lt;/C&gt;
    &lt;/B&gt;
  &lt;/A&gt;
  
  for each XMLDoc.children() as BNode
    array.append(BNode.getXPathValueAt('B/C'));
  end for each
  </code></pre>
  
  <p>Is there an easy way in Java to use XPaths like that to get deeply nested values in an XML document? I just need a quick and easy way to pull XPath values out of one XML document, and eventually stick them into a hashmap or object.</p>