∟XSD Schema XML DOM Validator - XsdSchemaDomValidator.java
This section describes a tutorial example on how to create a Validator instance from an XSD Schema instance to validate an XML file using the JAXP DOM interface.
After creating an XSD Schema instance from the XSD schema file,
we are ready to create a Validator instance from the schema instance.
This Validator instance can then be used to validate an XML file represented with the DOM interface
or the SAX interface.
Let's try the DOM interface first. If you need to learn DOM interface,
you can read the XML file DOM parser tutorial example described in another chapter of this book.
Here is a tutorial example program called XsdSchemaDomValidator.java
that validates an XML file against an XSD file using the DOM interface: