Use regular expressions to perform XML data verification

xiaoxiao2021-03-06  42

Use regular expressions to perform XML data verification

XML Schema is a definition of xml data definition file ? XSD as an extension of the file. It is also used to define a class XML file.

Typically, some special meanable data cannot be clearly described through the system preset data structure (type).

Declaring in the XML Schema specification: You can limit the simple type by Facet, resulting in some new atomic types (Atomic Types).

Facet has Pattern, Enumeration, etc .;

What is the useful in this is:

Pattern Regular Expression Language (Regular Expression Language)

Combined with the powerful function of the regular expression, some complex data structures can be made

Examples can be verified by XMLSPY, XMLWRITE, or JS / VBS, etc., the following example (MSXML4.0 support) is mentioned below.

Information on defining XML Schema can be found in the first part of the XML Schema specification of W3C. For information on built-in data types and limitations thereof, check the second part of the XML Schema specification. For a simple summary of these two parts XML Schema specification, please check the W3C Primer on XML Schema.

For regular expressions, you can 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 *** /