The best Why use XML Schema? Tutorial In 2024, In this tutorial you can learn XML Schema datatypes support,XML Schema using the XML syntax,XML Schema can protect data communication,XML Schema can be extended,Good form is not enough,
XML Schema is more powerful than the DTD.
One of the most important is the ability of XML Schema data types are supported.
Editor's note: The data constraints, or said facets, is XML Schema prototype of a term, Chinese can be translated as "face", used to constrain the allowable value of the data type.
Another important feature about XML Schema is that they are written by XML.
When data is sent from the sender to the recipient, the point is that both sides should respect the content of the same "expectations."
By XML Schema, the sender can in a recipient can understand the way to describe the data.
A data, such as "03-11-2004" in some countries, be interpreted as November 3, while in other countries as March 11.
However, a data type of XML element with, for example: <date type = "date"> 2004-03-11 </ date>, to ensure consistent understanding of the content, because the XML data type "date" requirement the format is "YYYY-MM-DD".
XML Schema is extensible, because they are written by XML.
We called the document conforms to the XML syntax of well-formed XML documents, such as:
Even the good form of the document, still can not guarantee that they will not contain errors, and those errors can have serious consequences.
Consider the following situation: you order 5 dozen laser printers, instead of five. By XML Schema, most of these errors can be caught in your software to verify.