[jdom-interest] Bug Fix Request for XMLOutput
Eric.Gravel at intervalintl.com
Tue Sep 9 15:28:48 PDT 2003
The problem I have encountered with XMLOutput can be worked around. I simply find that
it defeats the purpose of one of the class' method... unless I misunderstood the purpose
of the setNewlines(boolean) method.
My understanding of the method is that no carriage return would be outputted when writing
JDOM elements including xml prologue and doctype. Unfortunately, these 2 items always
had a new line printed after them. The solution that I found to work around this issue was
to set the newline character to be an empty string using XMLOutput.setLineSeparator("");
Looking at the XMLOutput.java file, I personally think that the code for output(Document doc, Writer out)
or actually anywhere that uses "out.write(currentFormat.lineSeparator);" should be changed
to read "newline(out);". Reason being that newline() checks to see if the currentFormat class
newlines field is set to true in order to output the lineSeperator field value of the currentFormat class.
This way, I could tell XMLOutput to setNewline(false) and no new line would be used to output
Eric A. Gravel
IT - Internet Development
Eric.Gravel at IntervalIntl.com
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the jdom-interest