[jdom-interest] setIgnoringElementContentWhitespace inoperant ?

Jason Hunter jhunter at xquery.com
Wed Dec 8 21:10:38 PST 2004

> I want the final document to look pretty, so doing the cleanup on output
> would require 2 cycles, parse document, save with compact format, read
> compact document, save with pretty format.
> Since these particular documents have no DTD, is there a way to tell the
> parser that there are no mixed elements, and thus perform the cleanup ?

Nope; I've long wanted an input.setIgnoringAllWhitespace() method on the 
SAXBuilder but when I started implementing it (it'd have to be a JDOM 
level feature as SAX parsers don't have such a notion), I found it 
difficult to do without a lot of look ahead.  Perhaps it'd be easier 
with today's SAXBuilder design.  You're welcome to implement such a 
feature.  I'd be happy to commit it.


More information about the jdom-interest mailing list