XmlSchema is a data definition file that defines XML and uses. xsd as the file extension. It is also used to define a class of XML files. Xml Schema is a data definition file that defines XML and uses. xsd as the file extension. It is also used to define a class of XML files.
Generally, data with special meanings cannot be clearly described through the predefined data structure (type.
Declared in the XML Schema Specification: you can use facet to restrict (restriction) simple types and generate some new Atomic types (Atomic types ).
Facet has pattern, enumeration, and so on;
Here we will talk about one of the most useful ones:
Pattern + regular exPRession language (regular exPRession language)
Combined with the powerful functions of regular expressions, you can describe some complex data structures.
Examples can be verified through xmlspy, xmlwrite, or js/vbs. Below is an example of js verification (which must be supported by msxml4.0)
For information on defining XML Schema, refer to the first part of W3C XML Schema specification. For information about the built-in data types and their available limitations, check the second part of the XML Schema specification. For a brief summary of these two XML Schema specifications, see W3C Primer on XML Schema.
For a regular expression, go to http://www.regexlib.com /.
Examples:
/*** Examples. xml ***/
Test
Moonpiazza@hotmail.com
127.0.0.1
#000000
Guest
Guest@371.net
202.102.224.25
# FFFFFF
/*** Examples. xsd ***/
/*** Examples.htm ***/