Export.XML.MetaDataType

Description

Setting that controls the type of metadata generated with the XML exported from a DataWindow object using the SaveAs method or a .Data.XML expression.

Applies to

DataWindow objects

Syntax

Describe and Modify argument:

"DataWindow.Export.XML.MetaDataType { = 'value ' }"

Parameter

Description

value

(exp) A string specifying a value of the Export.XML.MetaDataType enumerated datatype

Usage

This property must be set to specify the type of metadata generated before you call the SaveAs method with XML! as the SaveAsType to save data as an XML document, or use the .Data.XML expression to save data as an XML string. The metadata is saved into the exported XML itself or into an associated file, depending on the value of the Export.XML.SaveMetaData property.

The Export.XML.MetaDataType property is an enumerated datatype that can hold the following values:

Enumerated value

Numeric value

Meaning

XMLNone!

0

Metadata (XML Schema or DTD) is not generated when XML is exported

XMLSchema!

1

XML Schema is generated when XML is exported

XMLDTD!

2

DTD is generated when XML is exported

If the data item for a column is null or an empty string, an empty element is created when you export XML. If you select XMLSchema!, child elements with null data items are created with the content "xsi:nil='true'".


In the painter

In the Data Export tab in the Properties view for the DataWindow object, select XML from the Format to Configure list and select a value from the Meta Data Type list.

Examples

Example 1

These statements export the contents of dw1 to the file c:\myxml.xml using the XML export template called t_schema, and generate an external XML schema file at c:\myxml.xsd:

dw1.Modify("DataWindow.Export.XML.UseTemplate = 't_schema'")
dw1.Modify("DataWindow.Export.XML.MetaDataType = 1")
dw1.Modify("DataWindow.Export.XML.SaveMetaData = 1")
dw1.SaveAs("c:\myxml.xml", XML!, false)

See also

Export.XML.SaveMetaData