Try OpenEdge Now
skip to main content
Working with XML
Reading and Writing XML Data from Temp-Tables and ProDataSets : Methods and attributes
 

Methods and attributes

To use the XML read and write features described in this chapter, you use the handle to a temp-table, temp-table buffer, or ProDataSet to access methods and attributes of the object. The following table describes the available methods.
Table 19. XML methods for temp-tables and ProDataSets
Method
Description
READ-XMLSCHEMA( )
Creates a dynamic temp-table or ProDataSet from the specified XML Schema. Or, it can verify an existing ABL definition against the XML Schema.
READ-XML( )
Loads data into a static or dynamic temp-table or ProDataSet from the specified XML. Optionally, it can create the temp-table or ProDataSet definition or verify the definition against the specified XML Schema.
WRITE-XMLSCHEMA( )
Writes the schema of the specified static or dynamic temp-table or ProDataSet as XSD. Options allow you to control the formatting, encoding, and level of definition detail.
WRITE-XML( )
Writes the data and, optionally, the definition of the specified static or dynamic temp-table or ProDataSet as XML. Options allow you to control the formatting, encoding, and level of definition detail.
The XML related attributes are described in the following table.
Table 20. XML attributes for temp-tables and ProDataSets
Attribute
Data type
Applies to
Description
FOREIGN-KEY-HIDDEN 1
(Readable and writeable)
LOGICAL
Data-relation
Specifies whether the WRITE-XML( ) method should hide foreign key fields in the child records of a nested data-relation in a ProDataset.
NAMESPACE-URI 2
(Readable and writeable)
CHARACTER
temp-table temp-table bufferProDataSet
Specifies the namespace, a Uniform Resource Indicator (URI) used to uniquely identify attribute and element names and prevent collisions. Interacts with the NAMESPACE-PREFIX attribute.
NAMESPACE-PREFIX 3
(Readable and writeable)
CHARACTER
temp-table temp-table bufferProDataSet
Specifies the prefix which identifies elements belonging to the namespace specified by the NAMESPACE-URI attribute.
NESTED
(Readable and writeable)
LOGICAL
Data-relation
Specifies whether the AVM embeds child rows within a parent row in the XML. This affects both the data and schema.
SERIALIZE-HIDDEN 4
(Readable and writeable)
LOGICAL
Buffer-fieldProDataSet
Indicates whether a temp-table field and its value or ProDataSet name is written when the object is serialized, for example into JSON or XML. Interacts with the XML-NODE-TYPE attribute.
SERIALIZE-NAME5
(Readable and writeable)
CHARACTER
ProDataSettemp-tabletemp-table buffertemp-table buffer field
Optionally specifies the name of a ProDataSet, a temp-table, a temp-table buffer, or a temp-table buffer-field object as it should appear when serialized, for example into JSON or XML. Interacts with the XML-NODE-NAME attribute.
XML-NODE-NAME 6
(Readable and writeable)
CHARACTER
ProDataSettemp-tabletemp-table buffertemp-table buffer field
Optionally specifies an XML element name which the AVM uses instead of the default name for a ProDataSet, temp-table, temp-table buffer, or temp-table buffer field. Interacts with the SERIALIZE-NAME attribute.
XML-NODE-TYPE 7
(Readable and writeable)
CHARACTER
Buffer-field ProDataSet
Specifies the XML representation for the field. It must be a CHARACTER expression evaluating to one of these values: ELEMENT, ATTRIBUTE, TEXT, HIDDEN.Specifies the XML representation for the temp-table field and its value or ProDataSet name. For a buffer-field, valid values are "ELEMENT", "ATTRIBUTE", "TEXT", and "HIDDEN". For a ProDataSet, valid values are "ELEMENT" and "HIDDEN".
XML-DATA-TYPE
(Readable and writeable)
CHARACTER
Buffer-field
Specifies the XML Schema data type for the ABL buffer-field object. If the temp-table definition was created from an XML Schema, this attribute is the same as the type attribute from the XML Schema.

1 See MinimizingXML document size for more information.

2 For more information, see NAMESPACE-URIand NAMESPACE-PREFIX.

3 For more information, see NAMESPACE-URIand NAMESPACE-PREFIX.

4 For more information, see XML-NODE-TYPEand SERIALIZE-HIDDEN.

5 For more information, see XML-NODE-NAMEand SERIALIZE-NAME.

6 For more information, see XML-NODE-NAMEand SERIALIZE-NAME.

7 For more information, see XML-NODE-TYPEand SERIALIZE-HIDDEN.

* Attribute interactions
* ABL-specific attributes in XML Schema