Skip to content

ReplaceNode - cXMLDOMCDATASection

Replaces a node

Type: Function
Return Data Type: Handle

Parameters

Parameter Type Description
hoNewNode Handle Object Handle of the new node
hoNodeToReplace Handle Object Handle of the node to be replaced

Syntax

Function ReplaceNode Handle hoNewNode Handle hoNodeToReplace Returns Handle

Call Example

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
Col 1 Col 2
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.

Return Value

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