title: How to use XPath on xml docs having default namespace
body: <p>I want to manipulate xml doc having default namespace but no prefix. Is there a way to use xpath without namespace uri just as if there is no namespace?<br>
  I believe it should be possible if we set namespaceAware property of documentBuilderFactory to false. But in my case it is not working.<br>
  Is my understanding is incorrect or I am doing some mistake in code?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>    DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
      domFactory.setNamespaceAware(false);
      try {
          DocumentBuilder builder = domFactory.newDocumentBuilder();
          Document dDoc = builder.parse("E:/test.xml");
  
          XPath xPath = XPathFactory.newInstance().newXPath();
          NodeList nl = (NodeList) xPath.evaluate("//author", dDoc, XPathConstants.NODESET);
          System.out.println(nl.getLength());
      } catch (Exception e) {
          e.printStackTrace();
      }
  </code></pre>
  
  <p>Here is my xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;root xmlns="http://www.mydomain.com/schema"&gt;
    &lt;author&gt;
      &lt;book title="t1"/&gt;
      &lt;book title="t2"/&gt;
    &lt;/author&gt;
  &lt;/root&gt;
  </code></pre>