Methods and attributes
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
To use the XML read and write features described in this content, 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.
| 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.
| Attribute | Data type | Applies to | Description |
|---|---|---|---|
FOREIGN-KEY-HIDDEN
1
|
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
|
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
2
|
CHARACTER
|
temp-table temp-table bufferProDataSet | Specifies the prefix which identifies elements belonging to the namespace specified by the NAMESPACE-URI attribute. |
NESTED
|
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
3
(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-NAME4
|
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
4
|
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
3
|
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
|
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. |