XML schema with root element mapping to a temp-table
- Last Updated: October 14, 2014
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
The following example illustrates the functionality of creating a DATASET definition from an XML schema where the root element is mapped to a temp-table.
|
In the above XML Schema:
- The root element, person, is mapped to a temp-table with a single field, name.
- The nested child element, children, has no fields defined.
- The children element has a nested element, child, which maps to a temp-table with a single TEXT field.
The following is the static ProDataSet definition for the XML Schema:
|
The bproxsdto4gl utility defines ProDataSet named personDset,
with temp-tables person and children. READ-XML() and READ-XMLSCHEMA() creates
the dynamic equivalent of this static definition.
Since personDset is XML-NODE-TYPE "Hidden",
the <personDset> element is not written during WRITE-XML() call.
The root element of the XML document is <person>.
The ABL code required to create the data for personDset ProDataSet
and generate the person.xml document is as follows:
|
The person.xml XML file generated is as follows:
|