$doc = new DomDocument(); $doc->loadXML('<html><body></body></html>');
$hello = new DomDocument(); $hello->loadXML('<p>Hello world!</p>');
$xp = new DomXPath($doc); $body = $xp->query('/html/body')->item(0); $body->appendChild($hello->firstChild); // <-- Exception thrown here
echo $doc->saveHTML();
Here's the error message I'm getting:
Fatal error: Uncaught exception 'domexception' with message 'Wrong Document Error' in ... Stack trace: #0 {main} thrown in ... on line 18
I'm running PHP 5 beta 4 on Apache 1.3.29.
Thanks! -Dan
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php