Bentley Drake wrote: > > Hello, > > I'm noticing that the Crimson library seems to insert an awful lot of > whitespace into XML text streams that it generates from DOM. This > whitespace doesn't appear if a DOCTYPE reference is present, since the code > can use a validating parser and can therefore call the > DocumentBuilderFactory.setIgnoringElementContentWhitespace() method. I've > attached a Java class that parses and regenerates the XML text stream > (string->DOM->string), along with an example XML. Here's an example of the > output when the program is run against an XML document in a cyclic fashion:
Not sure I have time to work on this now. Maybe you can provide a patch. It looks like the code is using internal, non-JAXP APIs. If you have Xalan or the latest version of the JAXP RI 1.1.3, then you can use the TrAX API to do what you want. See my unofficial JAXP FAQ at http://xml.apache.org/~edwing/jaxp-faq.html for more info. -Edwin --------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]