title: PHP parse with DOM (no results)
body: <p>I am trying to retreive the body text located in this span class attribute.</p>
  
  <pre><code>&lt;span id="" style="color:#525B64;"&gt;The quick brown fox jumped over the lazy dog.&lt;/span&gt;
  </code></pre>
  
  <p>I tested it on my web server and I get no errors but the page is blank. I'm very new to this so I do not know where to go from here.</p>
  
  <p>Here is my code. </p>
  
  <pre><code>&lt;?php
  // Load remote file, supress parse errors
  libxml_use_internal_errors(TRUE);
  $dom = new DOMDocument;
  $dom-&gt;loadHTMLFile('http://somewebpage.com');
  libxml_clear_errors();
  
  // use XPath to find all nodes with a class attribute of header
  $xp = new DOMXpath($dom);
  $nodes = $xp-&gt;query('//span[@class="msgBody"]');
  
  // output first item's content
  echo $nodes-&gt;item(0)-&gt;nodeValue;
  ?&gt;
  </code></pre>