Host On-Demand et Database On-Demand prennent en charge deux types de fichier XML :
Un fichier DTD XML contient :
L'objet de la DTD (Data Type Definition) DatabaseOnDemand est de permettre aux programmes (tels que les �diteurs XML) de lire des fichiers XML afin de valider le contenu du fichier XML � l'aide de la DTD. La DTD DatabaseOnDemand est d�finie comme suit :
<!DOCTYPE DatabaseOnDemand [ <!ELEMENT DatabaseOnDemand (QUERY)> <!ELEMENT QUERY (ROW+)> <!ELEMENT ROW (COLUMN+)> <!ELEMENT COLUMN (#PCDATA)> <!ATTLIST COLUMN NAME CDATA #REQUIRED> <!ATTLIST COLUMN VALUE CDATA #REQUIRED> ]>
Le texte suivant est un exemple de donn�es XML cr��es selon la DTD DatabaseOnDemand :
<DatabaseOnDemand>
<QUERY>
<ROW>
<COLUMN NAME="TOPICID" VALUE="9" />
<COLUMN NAME="EXAMPLID" VALUE="54" />
<COLUMN NAME="DESCRIPT" VALUE="Ventes employ�" />
<COLUMN NAME="OBJECTID" VALUE="19" />
</ROW>
<ROW>
<COLUMN NAME="TOPICID" VALUE="12" />
<COLUMN NAME="EXAMPLID" VALUE="74" />
<COLUMN NAME="DESCRIPT" VALUE="Total des ventes" />
<COLUMN NAME="OBJECTID" VALUE="22" />
</ROW>
</QUERY>
</DatabaseOnDemand>
Dans l'exemple ci-dessus, TOPICID, EXAMPLID, DESCRIPT et OBJECTID sont des noms de colonne provenant de la base de donn�es h�te.
Le fichier Excel XML peut �tre ouvert et modifi� � l'aide de Microsoft Excel 2003.
Ci-dessous, un exemple de fichier Excel XML :
<?xml version="1.0" encoding="UTF-8"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook
xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml"
xmlns:udc="http://schemas.microsoft.com/data/udc"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile">
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
</DocumentProperties>
<Worksheet ss:Name="Sheet1">
<Table>
<Column ss:Width="200"/>
<Column ss:Width="200"/>
<Column ss:Width="200"/>
<Row ss:AutoFitHeight="0">
<Cell>
<Data ss:Type="String">SRCSEQ</Data>
<NamedCell ss:Name="_FilterDatabase"/>
</Cell>
<Cell>
<Data ss:Type="String">SRCDAT</Data>
<NamedCell ss:Name="_FilterDatabase"/>
</Cell>
<Cell>
<Data ss:Type="String">SRCDTA</Data>
<NamedCell ss:Name="_FilterDatabase"/>
</Cell>
</Row>
<Row ss:AutoFitHeight="0">
<Cell>
<Data ss:Type="Number">1.00</Data>
<NamedCell ss:Name="_FilterDatabase"/>
</Cell>
<Cell>
<Data ss:Type="Number">12</Data>
<NamedCell ss:Name="_FilterDatabase"/>
</Cell>
<Cell>
<Data ss:Type="String">Constructs a new String by decoding the specified array</Data>
<NamedCell ss:Name="_FilterDatabase"/>
</Cell>
</Row>
......
</Table>
</Worksheet>
<x2:MapInfo x2:HideInactiveListBorder="false">
<!-- Begin of x2:Schema -->
<x2:Schema x2:ID="Schema1" x2:Namespace="">
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element nillable="true" name="DatabaseOnDemand">
<xsd:complexType>
<xsd:sequence minOccurs="0">
<xsd:element minOccurs="0" nillable="true" name="QUERY" form="unqualified">
<xsd:complexType>
<xsd:sequence minOccurs="0">
<xsd:element minOccurs="0" maxOccurs="unbounded" nillable="true" name="ROW" form="unqualified">
<xsd:complexType>
<xsd:sequence minOccurs="0">
<xsd:element minOccurs="0" nillable="true" type="xsd:string" name="SRCSEQ" form="unqualified"></xsd:element>
<xsd:element minOccurs="0" nillable="true" type="xsd:string" name="SRCDAT" form="unqualified"></xsd:element>
<xsd:element minOccurs="0" nillable="true" type="xsd:string" name="SRCDTA" form="unqualified"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</x2:Schema>
<!-- End of x2:Schema -->
</Workbook>