Try OpenEdge Now
skip to main content
Working with XML
Reading and Writing XML with the Document Object Model (DOM) : Reading XML input into ABL
 

Reading XML input into ABL

This section describes how to read XML input into ABL.
To read in an XML file and process it:
1. Create an X-document object.
2. Create an X-noderef object to represent your root node.
3. Use the LOAD( ) method to read the input file.
4. Use the GET-DOCUMENT-ELEMENT( ) method to get the root node reference handle.
5. Create an X-noderef object to represent nodes for your document.
6. Using the GET-CHILD( ) method, read through the child nodes.
7. Using the GET-ATTRIBUTE( ) METHOD, the NAME attribute, the NODE-VALUE attribute and other attributes and methods, access the XML data.
8. Update the database or other fields as necessary.
9. Delete the objects.
* Loading an XML file
* Accessing the child nodes
* Examples of reading an input XML file