atom feed11 messages in org.jdom.jdom-interest[jdom-interest] PrintWriter in XMLOut...
FromSent OnAttachments
Brett McLaughlinJun 19, 2000 2:46 pm 
Jason HunterJun 19, 2000 4:07 pm 
Elliotte Rusty HaroldJun 19, 2000 4:51 pm 
Elliotte Rusty HaroldJun 19, 2000 6:48 pm 
Elliotte Rusty HaroldJun 20, 2000 10:16 am 
Jason HunterJun 20, 2000 11:45 am 
Thomas M. SasalaJun 20, 2000 1:01 pm 
Alex ChaffeeJun 21, 2000 2:29 am 
Elliotte Rusty HaroldJun 21, 2000 6:38 am 
Elliotte Rusty HaroldJun 21, 2000 11:26 am 
Kevin ReganJun 21, 2000 11:27 am 
Subject:[jdom-interest] PrintWriter in XMLOutputter
From:Elliotte Rusty Harold (elh@metalab.unc.edu)
Date:Jun 20, 2000 10:16:54 am
List:org.jdom.jdom-interest

I've uploaded a new version of XMLOutputter to

http://metalab.unc.edu/xml/jdom/XMLOutputter.java

This uses Writer instead of PrintWriter and doesn't suppress IOExceptions. I tested this against all the examples in my upcoming talk and it seemed to be bug-for-bug compatible with the old version.

The one open question in this version is what to use for a line separator. Right now I'm using \r\n since that's most cross-platform compatible and friendliest to various network protocols. However, \n alone might be slightly friendlier to XML parsers. Another possibility is to ask for System.getProperty("line.separator"). However, I'm loathe to make the output platform dependent. What do people think?

The value used is stored in a private field called newline so it's easy to change, if it turns out I've made the wrong choice here.