diff --git a/functions/domxml.xml b/functions/domxml.xml index 12ab610100..0066b38662 100644 --- a/functions/domxml.xml +++ b/functions/domxml.xml @@ -1,5 +1,5 @@ - + DOM XML functions DOM XML @@ -543,6 +543,10 @@ DomNode_append_child + + DomNode_remove_child + + DomNode_has_child_nodes @@ -2012,6 +2016,11 @@ $newnode->set_attribute("align", "left"); get_elements_by_tagname("tbody"); $element = $elements[0]; $child = $element->first_child(); @@ -2147,6 +2156,11 @@ print_r($children); get_elements_by_tagname("informaltable"); print_r($elements); $element = $elements[0]; @@ -2179,7 +2193,7 @@ echo ""; Description - nodeDomNode->append_child + objectDomNode->append_child objectnewnode @@ -2236,8 +2250,14 @@ $newnode = $doc->append_child($node); Adding a child get_elements_by_tagname("informaltable"); print_r($elements); $element = $elements[0]; @@ -2251,6 +2271,7 @@ echo "
";
 $xmlfile = $dom->dump_mem();
 echo htmlentities($xmlfile);
 echo "
"; +?> ]]>
@@ -2264,6 +2285,57 @@ echo "";
+ + + DomNode->remove_child + + Removes child from list of children + + + + Description + + objectDomNode->remove_child + objectoldchild + + + 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. + + + + Removing a child + +get_elements_by_tagname("tbody"); +$element = $elements[0]; +$children = $element->child_nodes(); +$child = $element->remove_child($children[0]); + +echo "
";
+$xmlfile = $dom->dump_mem(true);
+echo htmlentities($xmlfile);
+echo "
"; +?> +]]> +
+
+
+ + See also DomNode_append_child. + +
+
+ DomNode->has_child_nodes