Validating xml against xsd in java code
W3C_XML_SCHEMA_NS_URI); try catch (SAXException e) catch (IOException e) but you could just as easily validate against a local file.
There are numerous tools available for validating an XML document against an XSD.
This will start creating DOM objects as it parses the document - wasteful if you aren't going to use them.
You should not use the DOMParser to validate a document (unless your goal is to create a document object model anyway).
The validation process verify that an XML document is an instance of a specified XML schema file or XSD file.
In this example we are going to validate if the package org.kodejava.example.xml; import sax.