Create a dynamic temp-table with XML Schema
- Last Updated: January 17, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
A dynamic temp-table needs its definition supplied before
it can be put into a PREPARED state for reading
data. Using READ-XMLSCHEMA( ) on a temp-table
with no definition creates the definition from the XML Schema. The
method then places the temp-table in the PREPARED state.
The code example that follows does several things:
- Creates a dynamic temp-table
- Reads in XML Schema
- Displays some information about the definition of the temp-table
The read and write XML methods have many parameters. To make the code samples in this content more readable, each parameter is represented by a descriptively named variable. All these variable definitions are stored in an include file, as shown:
|
Here is the code sample:
|
The code displays the following:

In this next version, a non-ABL generated XML Schema file will
be used to create a new dynamic temp-table. The schema is very similar
to the Feedback table of the Sports2000 database.
The purpose of this example is to demonstrate mapping an XML Schema
field to something more useful for your ABL application.
Here is the ttFeedback.xsd file:
|
Elements with the XML Schema type "string" are mapped to CHARACTER fields
by default.
Here is the code that maps the Comments field
to a CLOB:
|
Here is the code sample output:
