A handle to a reference to an XML node. The X-noderef object is an ABL object that is a reference to any arbitrary node in an XML tree except a document node. You create the handle and assign it to a handle variable with the CREATE X-NODEREF statement.

An X-noderef object is not in a fully usable state until it has been associated with an X-document. Before this, you can only access its HANDLE, TYPE, PRIVATE-DATE, and UNIQUE-ID attributes without error. To avoid run-time errors, the following code shows one way to test the status of an X-noderef object:

cType = X-noderef-handle:SUBTYPE NO-ERROR.
IF VALID-HANDLE(X-noderef-handle) AND cType = 'ELEMENT' THEN DO:
   /*** your code ***/
END.

Syntax

x-noderef-handle [ :attribute | :method ]
x-noderef-handle
A handle variable that references an X-noderef object. You can use this handle as a parameter or return-value for attributes and methods that provide access to the underlying XML node.
attribute
An attribute of the X-noderef object.
method
A method of the X-noderef object.

Attributes

ATTRIBUTE-NAMES attribute CHILD-NUM attribute HANDLE attribute
INSTANTIATING-PROCEDURE attribute LOCAL-NAME attribute NAME attribute
NAMESPACE-PREFIX attribute NAMESPACE-URI attribute NODE-VALUE attribute
NUM-CHILDREN attribute OWNER-DOCUMENT attribute SUBTYPE attribute
TYPE attribute UNIQUE-ID attribute

Methods

APPEND-CHILD( ) method CLONE-NODE( ) method
DELETE-NODE( ) method GET-ATTRIBUTE( ) method
GET-ATTRIBUTE-NODE( ) method GET-CHILD( ) method
GET-PARENT( ) method INSERT-BEFORE( ) method
LONGCHAR-TO-NODE-VALUE( ) method MEMPTR-TO-NODE-VALUE( ) method
NODE-VALUE-TO-LONGCHAR( ) method NODE-VALUE-TO-MEMPTR( ) method
NORMALIZE( ) method REMOVE-ATTRIBUTE( ) method
REMOVE-CHILD( ) method REPLACE-CHILD( ) method
SET-ATTRIBUTE( ) method SET-ATTRIBUTE-NODE( ) method

Notes

The value of the UNIQUE-ID attribute on this handle is guaranteed to be unique only for the life cycle of the single XML document instance to which it belongs (the currently-associated X-document object handle). Once the currently-associated x-document handle is deleted, any new XML document (referenced with a new X-document handle value) can re-use the UNIQUE-ID attribute values for the x-noderef objects of the deleted document. Thus, you can track the uniqueness of x-noderef object instances within an ABL session by remembering each pair of UNIQUE-ID attribute values from a given x-noderef object handle and its associated x-document object handle.

See also

CREATE X-NODEREF statement, X-document object handle