[jdom-interest] Bug Fix Request for XMLOutput

Eric Gravel Eric.Gravel at intervalintl.com
Tue Sep 9 15:47:31 PDT 2003


Ah ok.  In that case, I'll stick with the work around I got.  I don't
think it'd be necessary to have a special method when there's a way to
work around... just a matter of snooping around the code and figuring
it out ;)  Like you said, if it's a matter of less evil then leave it
be as is.

The reason why I need to do this is that the system I'm writing to is
an AS/400 DataQueue and for some reason they don't want ANY new lines
in their message text.  I don't really understand why it would matter.
I've learn to just try to faciliate their requirements.

Anyway, thanks for the quick response Jason.  


-----Original Message-----
From: Jason Hunter [mailto:jhunter at servlets.com]
Sent: Tuesday, September 09, 2003 6:39 PM
To: Eric Gravel
Cc: jdom-interest at jdom.org
Subject: Re: [jdom-interest] Bug Fix Request for XMLOutput


That's a nice hack you've got there.  The reason we don't do as you say 
with "newline(out);" is because the prolog and doctype never are built 
with any whitespace around them, even in the likely event they had 
whitespace in the source document.  SAX strips it all out.  SAX just 
doesn't give any whitespace details outside the root element.

People generally want newlines after these things, so we write them.  We 
can't just write them if newlines are on, because if we did then in the 
default case  where newlines are turned off, we wouldn't write the 
whitespace in the prolog even though the input file had the whitespace. 
  People would write in all the time about ugly file output.

Our solution isn't better, but I consider it the lesser evil.  And it's 
nice there's a workaround if you really don't want the whitespace there. 
  We could add a special function setNewlinesInProlog() or something, 
but it doesn't seem to matter to most folks, esp if there's a workaround.

-jh-


****CONFIDENTIALITY NOTE****
This e-mail and any attached documentation is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential, and exempt from disclosure. If any reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately. Thank you.





More information about the jdom-interest mailing list