Advantages of XML Schemas Created Using XSD

An XML schema defines the list of elements and attributes that can be used in an XML document. In addition to the list of elements, an XML schema specifies the order in which these elements appear in the XML document, and their data types.
Microsoft has developed the XML Schema Definition(XSD) language to define the schema of an XML document. XML schema s  have now become a w3c recommendation for creating valid XML documents.

Advantages of XML Schema s Created Using XSD
Some of the advantages of creating an XML schema by using XSD are:

  • XSD provides control over the type of data that can be assigned to elements and attributes.
  • XSD enables you to create your own data types. This feature enhances the flexibility of defining the structure of the XML document.
  • XSD enables you to specify restriction on data. For example, you can ensure that the content of an element is a positive integer value.
  • The syntax for defining an XSD is the same as the syntax used for xml documents. Therefore, it is easier to learn the syntax of an XSD.
  • XML schema content models can be used to validate mixed content.
  • XML schema is extensible. This enables you to reuse parts of a schema in another schema and derive custom data types from existing data types.
  • XML schema is self documenting. Using the annotation element you can specify the intended purpose and attribute of a schema. This enables effective use of the schema by other.

0 comments:

Post a Comment