我有节点,并在循环中迭代它们。
$html = <<<HTML
<div id="test">
<span>1</span>
<span>2</span>
</div>
HTML;
$dom= new Zend_Dom_Query($html);
$results = $dom->query('span');
foreach($results as $node){
...
}
如何获取节点的html代码?(不是innerHTML,完整的HTML代码<span>1</span>
)