The DomNode class / om.DomNode methods |
Replaces a node by another in the children nodes of the current node.
replaceChild( new om.DomNode, old om.DomNode )
The replaceChild() nethod puts the om.DomNode element passed as first parameter at the place of the node referenced by the second parameter, in the children list of the object node calling the method.
The new node must be created before it is passed as parameter to this method, typically, with om.DomDocument.createElement().
DEFINE parent, new, old om.DomNode ... LET new = mydoc.createElement("Item") CALL parent.replaceChild(new, old)