[jdom-interest] end-of-line character

Alex Chaffee guru at edamame.stinky.com
Wed Jul 5 05:27:08 PDT 2000

I reread the javadoc and println() is what prints platform-dependent
line-endings.  The current version of XMLOutputter that I can have
(pre-Rusty, I think) uses println() all over, which is correct.  If
the current one outputs literal \ns, here's some code you can use to
make platform-dependent line-endings.

    static char[] newline;
    static {
	String separator = System.getProperty("line.separator", "\n");
	newline = separator.toCharArray();


 - A

Alex Chaffee                       mailto:alex at jguru.com
jGuru - Java News and FAQs         http://www.jguru.com/alex/
Creator of Gamelan                 http://www.gamelan.com/
Founder of Purple Technology       http://www.purpletech.com/
Curator of Stinky Art Collective   http://www.stinky.com/

More information about the jdom-interest mailing list