XML Schema: XML Syntax

XML schemas support XML syntax. Therefore, you do not need to learn a new language. For example, the following code snippet declares an element in an XML schema document:

    <xs:element name=”ELEMENT_NAME”>
      ...
      ...
    </xs:element>

Support for XML syntax also allows an XML parser to process the XML schema similar to any other XML document. In contrast, a DTD supports different syntax. However, DTDs can be more straightforward than XML schemas, for example, when document requirements are simple and you do not need to use data types.

The graphic shows how a parser can accept an XML schema document similar to an XML document.
Click the Next button to continue.