PreviousNextIndex

CREATE X-NODEREF statement

Creates a handle which can be used as a parameter or return-value for methods which will associate the handle with an XML node. This object is not a node in its own right, but merely a way to provide access to the underlying XML node.

Syntax

CREATE X-NODEREF handle [ IN WIDGET-POOL widget-pool-name ] 

handle
IN WIDGET-POOL widget-pool-name

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 code below shows one way to test the status of an X-noderef object:

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

Example

The following code fragment depicts creating an XML document node reference and using it to create a node:

DEFINE VARIABLE hXdoc AS HANDLE NO-UNDO. 
. . . 
CREATE X-DOCUMENT hXdoc. 
CREATE X-NODEREF hXnode. 
hXdoc:CREATE-NODE(hXnode,"City","ELEMENT"). 
. . . 

See also

CREATE X-DOCUMENT statement, DELETE OBJECT statement, X-document object handle, X-noderef object handle


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex