title: Get div's HTML content via xpath
body: <p>I need a support on the following issue, I have a website where I want to get a product descriptions via xpath. Below the example html of the content:</p>
  
  <pre><code>&lt;div id="description"&gt;
   &lt;span&gt;some test&lt;/span&gt;
   &lt;img src="some src"&gt;
   &lt;p&gt;
    some content etc.
   &lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and now I use the below code:</p>
  
  <pre><code>$result = $xpath-&gt;query('//div[@id="description"]');
  </code></pre>
  
  <p>but when I'm outputting the result with the below line:</p>
  
  <pre><code>echo "&lt;pre&gt;".$result-&gt;item( 0 )-&gt;nodeValue."&lt;/pre&gt;"; // there is always only one element
  </code></pre>
  
  <p>what I get is only unformatted: <strong>"some testsome content etc."</strong> with no spaces and other tags. I know it is because xpath treats all the other tags as nodes but...</p>
  
  <p>I there a way to get the div's content as HTML ?</p>