title: Need help with xPath expressions with namespaces
body: <p>I need some help with a xpath expression.</p>
  
  <p>I have the following xml document:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns="http://schemas.test.com/search/local/ws/rest/v1"&gt;
      &lt;nodeA&gt;text&lt;/nodeA&gt;
      &lt;nodeB&gt;
          &lt;nodeb1&gt;
              &lt;nodeb1a&gt;
                  &lt;nodeTest&gt;hello&lt;/nodeTest&gt;
              &lt;/nodeb1a&gt;
          &lt;/nodeb1&gt;
      &lt;/nodeB&gt;
  &lt;/Response&gt;
  </code></pre>
  
  <p>I am using Springs rest template to retrieve the data.</p>
  
  <p>Here is where I am using a xpath expression to get the node values:</p>
  
  <pre><code>xpathTemplate.evaluate("base:*", xmlSource, new NodeMapper() {
          public Object mapNode(Node node, int i) throws DOMException {
              Element response = (Element) node;
              System.out.println("hi: " + response.getTextContent());
  </code></pre>
  
  <p>I added base to my namespace map like this:</p>
  
  <pre><code>HashMap&lt;String, String&gt; nameSpaces = new HashMap&lt;String, String&gt;();
  nameSpaces.put("xsi", "http://www.w3.org/2001/XMLSchema-instance");
  nameSpaces.put("xsd", "http://www.w3.org/2001/XMLSchema");
  nameSpaces.put("base", "http://schemas.test.com/search/local/ws/rest/v1");
  ((Jaxp13XPathTemplate) xpathTemplate).setNamespaces(nameSpaces);
  </code></pre>
  
  <p>Using the expression base:* gives me the Response node and I am able to drill down to the child nodes using .getChildNodes and creating nodelists for each child.</p>
  
  <p>I would like to get the hello value directly with the xpath expression but I am not able to get it to work with anything but base:*.  Can someone help me with my expression?</p>
  
  <p>Thanks </p>