maxim
Новичок
Добавление одного dom php5 document целиком (от корня) в другой
суть вопроса
есть класс один из методов которого (get_doc_merged) возвращает dom document
$xml2 = $xml2->get_doc_merged();
Хочу теперь этот document прицепить к элементу (content) принадлежаoему другому документу
$content->appendChild( $xml2->importNode($xml2->documentElement, true));
В этом месте вылетает ошибка
Fatal error: Uncaught exception 'DOMException' with message 'Wrong Document Error' in z:\home\xml.ru\mash\modules\admin\admin_modlist.php:27 Stack trace: #0 z:\home\xml.ru\mash\modules\admin\admin_modlist.php(27): DOMNode->appendChild(Object(DOMElement)) #1 z:\home\xml.ru\mash\modules\admin\parser.php(80): require('z:\home\xml.ru\...') #2 z:\home\xml.ru\www\index.php(607): require('z:\home\xml.ru\...') #3 {main} thrown in z:\home\xml.ru\mash\modules\admin\admin_modlist.php on line 27
куда копать?
суть вопроса
есть класс один из методов которого (get_doc_merged) возвращает dom document
$xml2 = $xml2->get_doc_merged();
Хочу теперь этот document прицепить к элементу (content) принадлежаoему другому документу
$content->appendChild( $xml2->importNode($xml2->documentElement, true));
В этом месте вылетает ошибка
Fatal error: Uncaught exception 'DOMException' with message 'Wrong Document Error' in z:\home\xml.ru\mash\modules\admin\admin_modlist.php:27 Stack trace: #0 z:\home\xml.ru\mash\modules\admin\admin_modlist.php(27): DOMNode->appendChild(Object(DOMElement)) #1 z:\home\xml.ru\mash\modules\admin\parser.php(80): require('z:\home\xml.ru\...') #2 z:\home\xml.ru\www\index.php(607): require('z:\home\xml.ru\...') #3 {main} thrown in z:\home\xml.ru\mash\modules\admin\admin_modlist.php on line 27
куда копать?