Step 2 : Applying Structural Rules to an XML File |
Since XML allows you to create your own element (tag) names, you may want to specify rules to create your own template. DTDs (Document Type Definitions) and XML Schemas provide a language to create rules for structuring XML files, for example, "element A contains elements B and C". They also specify allowable data types, for example, "element B must be a date in the format CCYY-MM-DD". DTDs have their own language format whereas XML Schemas are written in XML and are more powerful than DTDs due to the very specific data type rules they can impose.
XMLwriter supports two XML Schema standards:
XDR Schema is based on the W3C's XML-Data Note. XDR Schema was developed by Microsoft and is non-W3C-compliant. MSXML and several other Microsoft products, such as Microsoft BizTalkTM Server, and Microsoft SQL ServerTM 2000 support XDR Schema. XDR Schema is a simpler language to learn and use compared to W3C XML Schema, however, it is limited and is likely to become superseded by the W3C XML Schema specification. For this reason, XMLwriter's online help is based on the W3C XML Schema specification.
A Basic DTD File
A Basic XML Schema File
Working with DTDs
Working with XML Schemas