InsertBeforeNode - cXMLDOMDocumentFragment

Inserts a new node before the current node

Type: Function

Return Data Type: Handle

Parameters: Handle hoNewNode Handle hoNode

ParameterDescription
hoNewNodeThe node to insert
hoNodeThe node to insert before


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


Syntax
Function InsertBeforeNode Handle hoNewNode Handle hoNode Returns Handle

Call: 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.