remove all children of a given node (simple way):
$node->nodeValue = '';
DOMNode->removeChild()(no version information, might be only in CVS) DOMNode->removeChild() -- Removes child from list of children说明class DOMNode {DOMNode removeChild ( DOMNode oldnode ) } This functions removes a child from a list of children. 异常
范例The following example will delete the chapter element of our XML document.
dave at dgx dot cz
28-Aug-2006 09:10
remove all children of a given node (simple way):
mytto at openxtrem dot com
07-Sep-2005 05:20
Back again on removing childs and iterators robustness.
karan
28-Aug-2005 05:48
can we directly remove a node which has some children or do we need to remove the children first.
blaine (at) blainegarrett (dot com)
24-Aug-2005 01:10
This might be obvious, but might help someone as well...
pedro at leb dot usp dot br
30-May-2005 07:24
You may also use the hasChild function:
vsematika at centrum dot cz
13-Feb-2005 07:35
For those who don't understand >sbeam at onsetcorps dot net on 02-Feb-2005 12:07< 'hack', here's a little discussion:
sbeam at onsetcorps dot net
03-Feb-2005 01:07
remove all children of a given node: | ||