om.DomNode.replaceChild

Replaces a node by another in the children nodes of the current node.

Syntax

replaceChild(
   new om.DomNode,
   old om.DomNode )
  1. new is a reference to the new node.
  2. old is the the node to be replaced.

Usage

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)