通过Schema对xml文档进行验证:
The Oracle Multi-Schema XML Validator (MSV) is a Java technology tool to validate XML documents against several kinds of XML schemata. It supports RELAX NG, RELAX Namespace, RELAX Core, TREX, XML DTDs, and a subset of XML Schema Part 1. This latest (version 1.2) release includes several bug fixes and adds better conformance to RELAX NG/W3C XML standards and JAXP masquerading.
This tool is:
- A command line tool that can read XML documents and validate them against a schema (DTD/RELAX/TREX/W3C). If an error is found, error messages are provided.
- A library that can be incorporated into Java applications as a validator.
目前对于xml,只关心DTD和schema,可惜对于schema只支持一个子集
RELAX NG(
http://relaxng.org/
):
RELAX NG is a schema language for XML.