--TEST--
XMLReader: Expand into existing DOM documet
--EXTENSIONS--
xmlreader
dom
--SKIPIF--
--FILE--
base book';
$xmlstring = '
new book';
$dom = new DOMDocument();
$dom->loadXML($basexml);
$reader = new XMLReader();
$reader->XML($xmlstring);
while ($reader->read()) {
if ($reader->localName == "book") {
$node = $reader->expand($dom);
if ($node->ownerDocument) {
echo $node->ownerDocument->documentElement->firstChild->textContent . "\n";
}
break;
}
}
$reader->close();
?>
--EXPECT--
base book