--TEST--
Test writing Element::$innerHTML on XML documents
--EXTENSIONS--
dom
--FILE--
createElementNS('urn:a', 'root');
$dom->appendChild($el);
$el->innerHTML = '
foo
bar
';
echo $dom->saveXML(), "\n";
$el->innerHTML = '';
echo $dom->saveXML(), "\n";
$el->innerHTML = '&';
echo $dom->saveXML(), "\n";
$el->innerHTML = '<foo>';
echo $dom->saveXML(), "\n";
echo "----------------\n";
$dom = DOM\XMLDocument::createFromString('');
$child = $dom->documentElement->appendChild($dom->createElementNS('urn:a', 'child'));
$child->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns', 'urn:b');
$child->innerHTML = '';
echo $dom->saveXML(), "\n";
var_dump($child->namespaceURI);
var_dump($child->firstChild->namespaceURI);
echo "----------------\n";
$dom = DOM\XMLDocument::createFromString(<<
XML);
$dom->documentElement->innerHTML = $dom->documentElement->innerHTML;
echo $dom->saveXML(), "\n";
echo "----------------\n";
$dom->documentElement->innerHTML = <<
XML;
echo $dom->saveXML(), "\n";
?>
--EXPECT--
foo
bar
&
<foo>
----------------
string(5) "urn:a"
string(5) "urn:a"
----------------
----------------