title: XPath returning null for "Node" when isNameSpaceAware and isValidating are "true"
body: <p>I am getting a null node when I an trying to parse an XML file.</p>
  
  <pre><code>XPath xPath = XPathFactory.newInstance().newXPath();
      Node node = null;
      try {
          node = (Node) xPath.evaluate(
                  "/mynode",
                  doc,
                  XPathConstants.NODE);
  </code></pre>
  
  <p>I am facing this issue only in case-<br />
  1. DocumentBuilderFactory- setNameSpaceAware is true<br />
  2. DocumentBuilderFactory- setValidating is true.</p>
  
  <p>If these are set to false, then I am getting correct results. Can anyone help me on understanding what is the relation of setting these attributes to false?
  (I have checked <a href="https://stackoverflow.com/questions/4380006/xpath-is-returning-null-for-xml-with-defaultnamespace">this</a> question, but it does not clear my doubt)</p>
  
  <p>Here is the xml-</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;mynode xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.example.com" xsi:schemaLocation="http://www.example.com example.xsd"&gt;
      &lt;name&gt;TargetName&lt;/name&gt;
      &lt;desc&gt;desc goes here&lt;/desc&gt;
      &lt;pack&gt;my.this&lt;/pack&gt;
      &lt;object&gt;my.ExampleObject&lt;/object&gt;
      &lt;properties&gt;
          &lt;attrib&gt;
              &lt;name&gt;id&lt;/name&gt;
              &lt;value&gt;ZZZ&lt;/value&gt;
          &lt;/attrib&gt;
          &lt;attrib&gt;
              &lt;name&gt;ind&lt;/name&gt;
              &lt;value&gt;X&lt;/value&gt;
          &lt;/attrib&gt;
      &lt;/properties&gt;
      &lt;children&gt;
          &lt;child&gt;
              &lt;name&gt;childnodename&lt;/name&gt;
              &lt;desc&gt;description goes here&lt;/desc&gt;
              &lt;invalues&gt;
                  &lt;scope&gt;ALL&lt;/scope&gt;
              &lt;/invalues&gt;
              &lt;outvalues&gt;
                  &lt;scope&gt;ALL&lt;/scope&gt;
              &lt;/outvalues&gt;
              &lt;akey&gt;
                  &lt;aname&gt;AAA&lt;/aname&gt;
                  &lt;key&gt;&lt;/key&gt;
              &lt;/akey&gt;
              &lt;msg&gt;
                  &lt;success&gt;code1&lt;/success&gt;
                  &lt;failure&gt;code2&lt;/failure&gt;
              &lt;/msg&gt;
          &lt;/child&gt;
      &lt;/children&gt;
  &lt;/mynode&gt;
  </code></pre>