Write XML Schema from a temp-table, temp-table buffer, or ProDataSet
- Last Updated: June 7, 2019
- 4 minute read
- OpenEdge
- Version 13.0
- Documentation
Syntax
The WRITE-XMLSCHEMA( ) method
writes an XML representation (an XML Schema document) of the definition
for a temp-table, temp-table buffer, or ProDataSet object. The XML Schema
is written using the XML Schema Definition (XSD) language.
When writing XML Schema for a temp-table or temp-table buffer object, the AVM writes temp-table and index definitions.When writing XML Schema for a ProDataSet object, the AVM writes all temp-table definitions, index definitions, and data-relations.
Here is the syntax
for WRITE-XMLSCHEMA( ). The method returns TRUE or FALSE to indicate
whether the operation was successful.
|
- target-type
- A
CHARACTERexpression that specifies the target XML Schema document type. Valid values are: "FILE", "STREAM", "MEMPTR", "HANDLE", and "LONGCHAR". - file
- A
CHARACTERexpression that specifies the name of a file to which the AVM writes the XML Schema document text. You can specify an absolute pathname or a relative pathname (based on the current working directory). If a file with the specified name already exists, the AVM verifies that the file is writable and overwrites the file. - stream
- A
CHARACTERexpression that specifies the name of a stream. If you specify the empty string (""), the AVM writes the XML Schema document text to the default unnamed output stream. - memptr
- A
MEMPTRvariable to contain the XML Schema document text. The method allocates the required amount of memory for the XML document text and sets the size of the variable. When you are finished using theMEMPTR, you must free the associated memory by executingSET-SIZE(memptr) = 0on theMEMPTR. - handle
- An X-document object handle or X-noderef object handle. If the specified handle contains XML text, the AVM deletes the existing text first.
- longchar
- A
LONGCHARvariable to contain the XML Schema document text. - formatted
- An optional
LOGICALexpression whereTRUEdirects the AVM to format the XML Schema document text in a hierarchical manner using extra white space, carriage returns, and line feeds. The default value isFALSE. - encoding
- An optional
CHARACTERexpression that specifies the name of the character encoding the AVM uses to write the XML Schema document text. The default encoding isUTF-8. - min-xmlschema
- An optional
LOGICALexpression whereTRUEdirects the AVM to write the minimum amount of XML Schema for the object, andFALSEdirects the AVM to write the complete XML Schema including ABL-specific XML Schema extensions. The default value isFALSE. If you specify theUnknown value (?), the method uses the default value ofFALSE. - omit-initial-values
- An optional
LOGICALexpression whereTRUEdirects the AVM to exclude temp-table fields containing their initial values from the XML document, andFALSEdirects the AVM to include all temp-table field data in the XML. The default value isFALSE. If you specify the Unknown value (?), the method uses the default value ofFALSE.Note: For an array field to be omitted, each element of the array must contain the initial value.