xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edwin Goei <Edwin.G...@eng.sun.com>
Subject Re: Validation and RevalidatingDOMParser questions
Date Fri, 06 Oct 2000 18:07:25 GMT
Andy Clark wrote:
> Jeffrey Rodriguez wrote:
> > In addition to this you need to provide a class that implements the
> > ErrorHandler interface  and you need to register it with the parser.
> > Look at the Xerces Samples under dom.wrappers package the source file
> > DOMParser ( xml-xerces\java\samples\dom\wrappers\DOMParser.java.
> This comes up so often, I think that the next version of Xerces
> should have a default error handler that prints errors to the
> standard output/error stream.

Yup, I think this would be a good idea too.  If validation is turned on,
a default ErrorHandler would be set which would implement the
ErrorHandler.error() method to print messages to System.err.  I've
implemented a handler which would print a warning to set an
ErrorHandler, before the first error message and then print the
remaining errors after that.  I'm thinking of changing this to print the
next 10 errors instead.

Implementing this for DOMParser should be OK, however for SAX, it might
make the parser non SAX conformant.  See


View raw message