Specifications
Exporting to XML
388 InfoMaker
To specify how metadata should be saved, select a value from the Meta Data
Type drop-down list. The possible values are:
• XMLNone!—No metadata is generated
• XMLSchema!—An XML schema is generated
• XMLDTD!—A DTD is generated
If the data item for a column is
null or an empty string, an empty element is
created. If you select XMLSchema!, child elements with
null data items are
created with the content
"xsi:nil='true'".
The metadata is saved into the exported XML itself or into an associated file,
depending on the setting in the SaveMeta Data drop-down list. The possible
values are:
• MetaDataInternal!—The metadata is saved into the generated XML
document or string. To save metadata using the
.Data.XML expression
syntax, you must use this value.
• MetaDataExternal!—The metadata is saved as an external file with the
same name as the XML document but with the extension .xsd (for a
schema) or .dtd (for a DTD). A reference to the name of the metadata file
is included in the output XML document.
Example: internal
metadata
For example, if you select XMLDTD! and MetaDataInternal!, the header and
first row of the exported XML would look like this for a simple grid report for
the
contact table in the EAS Demo DB. The Include Whitespace property has
also been selected and the file name is dtdinternal.xml:
<?xml version="1.0" encoding="UTF-16LE"
standalone="yes"?>
<!DOCTYPE dtdinternal [<!ELEMENT dtdinternal
(dtdinternal_row*)>
<!ELEMENT dtdinternal_row (id, last_name, first_name,
title, street, city, state, zip, phone, fax)>
<!ELEMENT id (#PCDATA)>
<!ELEMENT last_name (#PCDATA)>
<!ELEMENT first_name (#PCDATA)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT street (#PCDATA)>
<!ELEMENT city (#PCDATA)>
<!ELEMENT state (#PCDATA)>
<!ELEMENT zip (#PCDATA)>
<!ELEMENT phone (#PCDATA)>
<!ELEMENT fax (#PCDATA)>
]>