Get entire BODY content using PHP DOM DOCUMENT
<p>I want to get entire body tag content using DOM Document. </p>

<p>I used following code:</p>

<pre><code>$dom = new domDocument;

/*** load the html into the object ***/
$dom-&gt;loadHTML($html);

/*** the table by its tag name ***/
$tables = $dom-&gt;getElementsByTagName('body')-&gt;list(0)-&gt;nodeValue;
</code></pre>

<p>This gives me TExt. I want entire body content.  </p>
