xml valid分为两种:DTD(Document Type Definition)和XML Schema。
What is validation?
XML files are designed to be easy for people to read and edit. They are also
designed for easy data exchange among different systems and different
applications.
Valid documents are always well formed, but well-formed documents may not be valid. --What does it mean?
Compare this simple document and its DTD:
XML document:
DTD
XML schemas
XML document:
XML Schema:
using XML Namespaces instead of the DOCTYPE.
to be continued--section 3 validating a document.