[jdom-interest] A hack for DTD validating a modified DOM

Michael Kay mike at saxonica.com
Mon Jan 10 06:09:16 PST 2005


> I was going to ask this on the list myself until I hit upon the ugly, 
> but reliable and immediately available solution - write the 
> DOM out to a 
> stream and load it back in again with validation.

You don't need to serialize and reparse - there are DTD validators that will
work from a stream of SAX events. For example

http://xmlconf.sourceforge.net/java/apidoc/gnu/xml/pipeline/ValidationConsum
er.html

Michael Kay



More information about the jdom-interest mailing list