title: php DOMDocument: return nodeValue including childNode
body: <p><strong>file.html</strong></p>
  
  <pre><code>&lt;div&gt;
      &lt;a href=""&gt;apple&lt;/a&gt;
  &lt;/div&gt; 
  </code></pre>
  
  <p><br/></p>
  
  <pre><code>$html = new DOMDocument();
  $html-&gt;preserveWhiteSpace = true;
  $html-&gt;loadHTML( file_get_contents('file.html') );
  $nodes =  $html-&gt;getElementsByTagName('*');
  
  foreach($nodes as $i=&gt;$node) {
       if($node-&gt;nodeName == 'div')
       echo $node-&gt;nodeValue;
  }
  </code></pre>
  
  <p><br/>
  this returns 'apple'. How do I get the child node including the child node's value, as in:<br/>   <code>&lt;a href="#"&gt;apple&lt;/a&gt;</code></p>