What does a non validating xml parser do
The default response to a validation error, as dictated by the SAX standard, is to do nothing.
It is presented here in its entirety (complete with comments) so that you can use it as a template in your applications.
Note - JAXP-conformant parsers are not required to support all combinations of those options, even though the reference parser does.
If you specify an invalid combination of options, the factory generates a More information about how to use name spaces and validation is provided in Validating with XML Schema, in which the code that is missing from the above extract will be described.
For example, you will see what entity references and CDATA sections look like in the DOM.
And perhaps most importantly, you will see how text nodes (which contain the actual data) reside under element nodes in a DOM.
In particular, you use the Document Builder db = Document Builder(); Output Stream Writer error Writer = new Output Stream Writer(System.err, output Encoding); Error Handler(new My Error Handler (new Print Writer(error Writer, true))); Document doc = db.parse(new File(filename)); does not do anything yet.