note 52181 deleted from function.domnode-append-child by didou
| From: | didou@php.net | Date: | Sun, 12 Jun 2005 17:16:41 +0000 |
| Subject: | note 52181 deleted from function.domnode-append-child by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-90310@lists.php.net to get a copy of this message | ||
Note Submitter: takegawa at pchome dot com dot tw
----
when i run this php page ...there are 2 last level disappear...
why $itemNode_2 and $itemNode_3 were't appended...
anyone knows this reason?? 3q
(my english is poor ,haha~~ forget it!!! ^^)
$dom = domxml_new_doc('1.0');
$example=$dom->create_element('root');
$date=$dom->create_element('test0');
$itemNode_0=$dom->create_element(test1);
$itemNode_1=$dom->create_element(test2);
$itemNode_0->append_child($itemNode_1);
$itemNode_2=$dom->create_element(test3);
$itemNode_1->append_child($itemNode_2);
$itemNode_3=$dom->create_element(test4);
$itemNode_2->append_child($itemNode_3);
$date->append_child($itemNode_0);
$example->append_child($date);
$dom->append_child($example);
header ('Content-Type: text/xml');
echo ( $dom->dump_mem() );