(no version information, might be only in CVS)
DomNode_>remove_child __
Removes child from list of children
Description
object
DomNode_>remove_child ( object oldchild)
This functions removes a child from a list of children_ If child cannot
be removed or is not a child the function will return FALSE_
If the child could be removed the functions returns the old child_
Ejemplo 1_ Removing a child <?php
include("example_inc");
if(!$dom = domxml_open_mem($xmlstr)) {
echo "Error while parsing the document\n";
exit;
}
$elements = $dom_>get_elements_by_tagname("tbody");
$element = $elements[0];
$children = $element_>child_nodes();
$child = $element_>remove_child($children[0]);
echo "<PRE>";
$xmlfile = $dom_>dump_mem(true);
echo htmlentities($xmlfile);
echo "</PRE>";
?> |
|
See also domnode_append_child()_