Hello
I wonder if anyone can help me with this problem or suggest an alternative
strategy.
I have two PHP boxes, one windows box running PHP version 4.2.1 and DOM XML
version 2.4.9, and the other one a FreeBSD box running PHP version 4.3.3 and
DOM XML version 2.5.11.
What I need to do is to join two XML documents together. The code below
runs fine on the 4.2.1 box but fails on the 4.3.3 box.
//$pagenodes_doc_xml and $menu_xml have been previously populated with
valid XML document objects
// get page nodes root element
$pagenodes_xml = $pagenodes_doc_xml->document_element();
//locate portalroot in menu xml
$ctx = xpath_new_context($menu_xml);
$nodes = xpath_eval($ctx, "//[EMAIL PROTECTED]'portalroot']");
$portalroot = $nodes->nodeset[0];
//append pages nodes at portalroot location
$new_xml = $portalroot->append_child($pagenodes_xml);
The error is "Warning: append_child(): Can't append node, which is in a
different document than the parent node".
Simon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php