Read XML into a ProDataSet
- Last Updated: October 17, 2024
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
XML information read into a ProDataSet includes:
- Schema for defining a ProDataSets's temp-table buffers, temp-table indexes, and temp-table data-relations
- Data for the temp-table buffers
- Before-image information for the temp-table buffers
In this first code example, two static temp-tables are defined in an include file:
|
Here is a snippet of the XML file:
|
The following code sample defines the static ProDataSet, reads the previous XML file, and reports all the orders by customer number:
|
The code displays a report of all the orders for each customer. For example:

This next code sample provides a dynamic ProDataSet handle with XML Schema and data:
|
The following is the output for this code:

In this sample, a handle was defined and used to create a new
dynamic ProDataSet. The ProDataSet is in the CLEAR state
at this point, meaning it has no ABL definition. When the code calls
the READ-XML( ) method, the method sees
that XML Schema has been provided. Since the dynamic ProDataSet
is in the clear state, it knows the schema is being provided to
create ABL definitions for the object from the XML Schema. If the
ProDataSet had not been in the CLEAR state, the
method would have to verify the XML Schema against whatever ABL
definition existed for the ProDataSet.
The method can proceed to read in the data from the XML document provided
in the method call. The code displays the number of temp-tables
and data-relations in the dynamic object as well as a summary of
the employee records now in the ttEmp temp-table.