title: Retrieve value of attribute using XPath
body: <p>I am trying to retrieve the value of an attribute from an xmel file using XPath and I am not sure where I am going wrong..</p>
  
  <p>This is the XML File</p>
  
  <pre><code>&lt;soapenv:Envelope&gt;
    &lt;soapenv:Header&gt;
      &lt;common:TestInfo testID="PI1" /&gt;
    &lt;/soapenv:Header&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>And this is the code I am using to get the value. Both of these return nothing..</p>
  
  <pre><code>XPathBuilder getTestID = new XPathBuilder("local-name(/*[local-name(.)='Envelope']/*[local-name(.)='Header']/*[local-name(.)='TestInfo'])");
  XPathBuilder getTestID2 = new XPathBuilder("Envelope/Header/TestInfo/@testID");
  
  Object doc2 = getTestID.evaluate(context, sourceXML);
  Object doc3 = getTestID2.evaluate(context, sourceXML);
  </code></pre>
  
  <p>How can I retrieve the value of testID?</p>