次のHTMLがあるとしましょう。
<div class="some-class">
<p> some paragraph</p>
<h2>a heading</h2>
</div>
<div class='some-class'>
HTMLを含め、すべてを取得したいと思います。以下はテキストのみを取得します。
$descriptions = $xpath->query("//div[contains(@class, 'some-class')]");
foreach($descriptions as $description)
print $description->textContent;
含まれているHTMLタグも取得するための最良の方法は何ですか?