title: Problem using XPath to Parse XML String Data
body: <p>I'm trying to use XPath to parse an XML string but I am getting only null values back. Does anyone have an idea where I might be going wrong in the code shown below?</p>
  
  <pre><code>public static void main(String[] args) {
      String content = "&lt;imagesXML&gt;&lt;Images&gt;&lt;Image&gt;&lt;ImageUID Scope='Public' Type='Guid' Value='{7f2535d0-9a41-4997-9694-0a4de569e6d9}'/&gt;&lt;CorbisID Scope='Public' Type='String' Value='42-15534232'/&gt;&lt;Title Scope='Public' Type='String' Value='Animal'/&gt;&lt;CreditLine Scope='Public' Type='String' Value='¬© Robert Llewellyn/Corbis'/&gt;&lt;IsRoyaltyFree Scope='Public' Type='Boolean' Value='False'/&gt;&lt;AspectRatio Scope='Public' Type='String' Value='1.500000'/&gt;&lt;URL128 Scope='Public' Type='String' Value='http://cachens.corbis.com/CorbisImage/thumb/15/53/42/15534232/42-15534232.jpg'/&gt;&lt;/Image&gt;&lt;/Images&gt;&lt;/imagesXML&gt;";
      InputSource source = new InputSource(new StringReader(content));
      XPath xPath = XPathFactory.newInstance().newXPath();
      NodeList list = null;
      try {
          list = (NodeList) xPath.evaluate("//URL128[@Value]", source,
                  XPathConstants.NODESET);
      } catch (Exception ex) {
          System.out.println(ex.getMessage());
      }
      for (int i = 0; i &lt; list.getLength(); i++) {
          System.out.println(list.item(i));
      }
  }
  </code></pre>
  
  <p>The output from System.out is 'value=[URL128: null]', but it should be the URL I am trying to extract: <code>http://cachens.corbis.com/CorbisImage/thumb/15/53/42/15534232/42-15534232.jpg</code>.</p>
  
  <p>Any help appreciated, thanks.</p>