Skip to content

InsertBeforeNode - cXMLDOMCDATASection

Inserts a new node before the current node

Type: Function
Return Data Type: Handle

Parameters

Parameter Type Description
hoNewNode Handle The node to insert
hoNode Handle The node to insert before

Syntax

Function InsertBeforeNode Handle hoNewNode Handle hoNode Returns Handle

Call Example

Get InsertBeforeNode hoNewNode hoNode to HandleVariable

Description

InsertBeforeNode inserts a new node before the current node.

InsertBeforeNode supports two parameters, the node to insert and the node to insert before (the reference node) as follows:

Get InsertBeforeNode of hoRoot hoNewNode hoReferenceNode to hoNewNode

If the reference node is zero or a second parameter is not passed, it will append (as per dom specification) making it act just like AppendNode.

Return Value

If the operation is successful, the method will return the object handle that was passed, which now represents the appended node. If zero is returned, the operation failed and the old node remains unchanged