note 101185 added to domnode.appendchild
| From: | frame at dynamiccreated dot de | Date: | Wed, 01 Dec 2010 12:14:17 +0000 |
| Subject: | note 101185 added to domnode.appendchild | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-174514@lists.php.net to get a copy of this message | ||
Aware dealing with DOMNodeList and appendChild() on the same Node.
If you want to replace only the children not the DOMElement itself you probably foreach
childNodes-property or get the DOMElements with a for-loop and item()-method of the DOMNodeList.
You will fail if you not clone the received single DOMElement. Actually the count of the DOMNodelist
will be decreased on appendChild count but appendChild seems to refer to the old Nodelist and
nothing visible will happen. Cloning will help.
----
Server IP: 212.124.37.9
Probable Submitter: 84.112.178.219
----
Manual Page -- http://www.php.net/manual/en/domnode.appendchild.php
Edit -- https://master.php.net/note/edit/101185
Del: integrated -- https://master.php.net/note/delete/101185/integrated
Del: useless -- https://master.php.net/note/delete/101185/useless
Del: bad code -- https://master.php.net/note/delete/101185/bad+code
Del: spam -- https://master.php.net/note/delete/101185/spam
Del: non-english -- https://master.php.net/note/delete/101185/non-english
Del: in docs -- https://master.php.net/note/delete/101185/in+docs
Del: other reasons-- https://master.php.net/note/delete/101185
Reject -- https://master.php.net/note/reject/101185
Search -- https://master.php.net/manage/user-notes.php