title: XpathExpressrion; get value of timestamp
body: <p>I am trying to read the value of an attribute containing a timestamp from a node.
  My xml looks like this</p>
  
  <pre><code>    &lt;doc&gt;
  &lt;str name="request_code"&gt;\&lt;/str&gt;
  &lt;str name="id"&gt;3226&lt;/str&gt;
  &lt;str name="request_name"&gt;John Doe&lt;/str&gt;
  &lt;str name="type"&gt;Requests&lt;/str&gt;
  &lt;str name="content_txt"&gt;...&lt;/str&gt;
  &lt;str name="id"&gt;...&lt;/str&gt;
  &lt;date name="lastModified_dt"&gt;1970-01-01T00:00:00Z&lt;/date&gt;
  &lt;/doc&gt;
  </code></pre>
  
  <p>I am able to get value of all the attributes except for the timestamp using 
  the following expression,</p>
  
  <pre><code>.//str[@name='content_txt']
  </code></pre>
  
  <p>However when i try to get the value of the timestamp using the expression</p>
  
  <pre><code>.//date[@name='lastModified_dt']
  </code></pre>
  
  <p>It always returns empty. </p>
  
  <p>Here is my Implementation</p>
  
  <pre><code>private Date getDateValue(Node responseNodeUrl, String attribute) throws SearchException {
          try {   
              Node evalNode = null;
              evalNode = responseNodeUrl;
              XPath xPath = XPathFactory.newInstance().newXPath();
              XPathExpression expr;
               expr = xPath.compile(".//date[@name='"+attribute+"']");  
              Object result ;
              result= expr.evaluate(evalNode);    
              xPath.reset();
              System.out.println(result);
  
              return result;
          } catch (XPathExpressionException e) {
              log.error("Error in SearchEngine:getAttributeValue:: "+e.getMessage());
              throw new SearchException(e);
          }
      }
  </code></pre>
  
  <p>Any help is greatly appreciated.</p>