Map ABL names to different XML element or attribute names
- Last Updated: October 17, 2024
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
If you have XML Documents or XML Schemas that you import and
export through ABL, you can always adjust your ABL definitions or
XML Schema to use identical names. In some cases, you may be working
with pre-existing ABL definitions and XML Schema that cannot be
easily changed. The XML-NODE-NAME or SERIALIZE-NAME attributes
on a ProDataSet object handle, temp-table object, temp-table buffer
object, or buffer field object allows you to specify an XML element
(or attribute) name for the ABL object. For more information on
the interaction of these attributes, see XML-NODE-NAME and SERIALIZE-NAME.
You can set these attributes on the DEFINE BUFFER, DEFINE
DATASET, or DEFINE TEMP-TABLE statement
by using the corresponding options. You can set them for a buffer
field using the field definition options of the DEFINE TEMP-TABLE statement.
You can also directly set the XML-NODE-NAME or SERIALIZE-NAME attributes
on the object handle.
These attributes allow you to work around ABL names that use illegal XML characters or to work around XML element or attribute names that are reserved words in ABL.
The ABL READ-XMLSCHEMA( ) method and
the xsdto4gl utility create ABL temp-table or ProDataSet definitions
with the correct ABL names.
The following example demonstrates the use of the attribute by mapping names illegal in ABL or XML to an acceptable substitute:
|
This is the XML Document written by the code:
|