Skip to content

RemoveNamedNode - cXMLDOMDocument

Removes the named node

Type: Function
Return Data Type: Handle

Parameters

Parameter Type Description
sQueryString String Node Name

Syntax

Function RemoveNamedNode String sQueryString Returns Handle

Call Example

Get RemoveNamedNode sQueryString to HandleVariable

Description

RemoveNamedNode is not namespace aware and only works reliably for elements with no namespaces and no prefixes. You should use RemoveQualifiedNode in its place.

RemoveNamedNode removes the named 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 removed (assuming the named node was found), or 0 if not.

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 removed node and add it somewhere else.

Return Value

The returned value is the object handle of the node that got removed (assuming the named node was found), or 0 if not.