7.18. Opt_Xml_Scannable class
7.18.15. replaceChild()
7.18.14. removeChildren()
« Previous
7.18.16. sort()
Next »

7.18.15. replaceChild()

ConstructMethod
Visibilitypublic
Referencebool replaceChild(Opt_Xml_Scannable $newNode, mixed $refNode [, $dispose = false ])
Argument list
$newNode - Opt_Xml_Scannable
The new node to insert
$refNode - mixed
The node to be replaced
$dispose - boolean
Dispose the old node?
Returned valueTrue on success

Replaces the child node $refNode with the $newNode. $refNode may be specified either by the order number or by the object. The method returns true, if the replacement is successful. The third, optional argument, $dispose controls disposing the memory of the old node. If the value is set to true, the old node is destroyed after replacing.

$dispose argument is available since OPT 2.0.1.

7.18.15. replaceChild()
7.18. Opt_Xml_Scannable class
« Previous
7.18.14. removeChildren()
Next »
7.18.16. sort()