It's not necessarily what you're doing wrong, it's simply that the OutputFormat and the DOMWriter are not perfect. They parse in the whitespace and send it back out in some odd fashion that I don't quite understand.
I've had this problem as well and I tried to fix it by telling Xerces to drop ignorableWhitespace, but that did not work for me. In the end, I created a small bit of code that traverses the DOM tree looking for ignorable whitespace text nodes and then removing them. The output then was formatted properly. I know this isn't much help beyond putting your mind at ease that it's not something you did wrong per se. Brion Swanson -----Original Message----- From: Eric [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 16, 2001 12:31 AM To: [EMAIL PROTECTED] Subject: problems formatting output I've been having some troubling problems using OutputFormat to write out a DOM. I'm basically parsing some ugly XML (spaces before '>'s, no newlines, etc.) into a DOM and then writing it back out. I've traversed the DOM and it looks like it gets parsed just fine, but when I use OutputFormat to write it out, the output still has ugliness (although different from the input). Tags are word-wrapped so that they split over lines, etc. It looks like this: <time>15:04:27</time> <anten type="broadcast"> <Station num="17650"> What am I doing wrong??? Thanks, Eric. -- _____ _ | ____|(_) http://ir.iit.edu/~ej | _| | | Page me via ICQ at | |___ | | http://wwp.mirabilis.com/19022931 |______/ | or by mailing [EMAIL PROTECTED] |__/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
