title: xPath can't find the indicated element
body: <p>To illustrate my problem, I reduced it down to the following:</p>
  
  <pre><code>&lt;?php
      $html = "
          &lt;!doctype html&gt;
          &lt;html&gt;
              &lt;head&gt;
                  &lt;title&gt;Test Title&lt;/title&gt;
              &lt;/head&gt;
              &lt;body&gt;
                  &lt;p&gt;Test Body&lt;/p&gt;
              &lt;/body&gt;
          &lt;/html&gt;
      ";
  
      $dom = new DOMDocument($html);
      $xPath = new DOMXPath($dom);
  
      $result = $xPath-&gt;query("//html/head/title");
      var_dump($result);
  
      $title = $result-&gt;item(0);
      var_dump($title);
  ?&gt;
  </code></pre>
  
  <p>I'm trying to extract the title text. Running this, the returned node list is of length 0, so obviously the second check fails as well:</p>
  
  <pre><code>C:\xampp\htdocs\mySite\partials\testPage.php:17:
  object(DOMNodeList)[3]
    public 'length' =&gt; int 0
  
  C:\xampp\htdocs\mySite\partials\testPage.php:20:null
  </code></pre>
  
  <p>This is such a simple example, I'm either grossly misunderstanding something, or I need some kind of pre-configuration (but I haven't seen that to be necessary in examples).</p>