ReplaceNode - cXMLDOMDocumentFragment

Replaces a node

Type: Function

Return Data Type: Handle

Parameters: Handle hoNewNode Handle hoNodeToReplace

ParameterDescription
hoNewNodeObject Handle of the new node
hoNodeToReplaceObject Handle of the node to be replaced


Return Value

Returns the object handle of the node that was replaced, zero if failure


Syntax
Function ReplaceNode Handle hoNewNode Handle hoNodeToReplace Returns Handle

Call: Get ReplaceNode hoNewNode hoNodeToReplace to HandleVariable


Description

ReplaceNode replaces a node.

An object handle is returned, and the object must be disposed of by sending the Destroy message to it. The returned value is the object ID of the node that got replaced.

Get ReplaceNode of hoElement hoNewChildElement hoOldChildElement to hoOldNode

Note:This function returns an XML node object and, like all XML node objects, it is the responsibility of the developer to destroy them when they are no longer needed. The reason IDs are returned and not automatically destroyed is that it gives you the ability to do something else with the node. You could, for example, take a replaced node and add it somewhere else.