Progress
External Program
Interfaces
Document and Node Reference Objects
The X-DOCUMENT is a Progress 4GL object that represents a DOM Document object. The X-DOCUMENT object is assigned to the HANDLE data type and is used to manipulate the XML document and its tree representation.
The X-NODEREF object is a Progress 4GL object that is a reference to any node in an XML tree except a Document node. The X-NODEREF object is assigned to the HANDLE data type and is used to manipulate the DOM nodes. Note that an X-NODEREF object is not an actual node in the XML tree but is more like a cursor which is used to navigate the tree and manipulate the nodes in it.
Creating a Document Object
The creation and saving of a document is not part of the DOM Core API, but is left to the application that calls the API. You create an XML document using the X-DOCUMENT option of the CREATE Widget statement:
This statement creates a handle for an object of the type “X-DOCUMENT” that “wraps” an XML document. You may start adding nodes to it or use the LOAD( ) method to populate it from an existing XML document.
Creating a Node Reference Object
You add a node reference object to the XML document using the X-NODEREF option of the CREATE Widget statement:
This statement creates a handle for an object which is not an actual node, but which is used as a reference or pointer to an actual node in the tree. The X-NODEREF object provides a path to access and manipulate the actual document nodes and can be used as a parameter or as a return-value for methods that will associate the handle with an XML node.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |