XML schema with no explicit field definition for a parent table
- Last Updated: February 17, 2025
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
XML schema with no explicit field definition for a parent table
The following example demonstrates the functionality of creating a DATASET definition from an XML schema where a parent temp-table contains no field definitions. The following XML schema is structured as a ProDataSet:
|
This XML schema is structured like a ProDataSet, Air_FlightInfo containing
three temp-tables:
-
generalFlightInfo, with no fields defined -
flightDatenested withgeneralFlightInfo, with 4 fields:departureDate,departureTime,arrivalDate, andarrivalTime -
flightIdentificationnested withingeneralFlightInfo, with two fields:flightNumber, andoperationalSuffix
The following is the static ProData definition for the XML schema:
|
The top-level table, generalFlightInfo, does not
have fields defined. Therefore, bproxsdto4gl and READ-XMLSCHEMA( ) adds
an integer <tablename_field>, in this case generalFlightInfo_field,
to the generalFlightInfo temp-table definition. READ-XML() or READ-XMLSCHEMA() methods
on the XML Schema will create the dynamic equivalent of this static
definition.
The following is the ABL code required to create the data for
the Air_FlightInfo dataset:
|
The following is the XML output:
|