Re: End-of-line sequence.
Elliotte Rusty Harold <[email protected]>
| Newsgroups | gmane.comp.java.jdom.general |
|---|---|
| Message-ID | <CAGhczrrFdEh6L=wsh22qzTBVs+yB9CPDdj0s56GXSdtE1zoVqg@mail.gmail.com> |
On Mon, Nov 14, 2011 at 8:29 PM, Rolf <[email protected]> wrote: > Hi all. > > JDOM has been merrily using "\r\n" as an end-of-line sequence in the > XMLOutputer since 'forever'. The XML Spec indicates that all end-of-line > sequences should be normalized to a single '\n': > http://www.w3.org/TR/REC-xml/#sec-line-ends The wording is such that XML > parsers should clear out any extra '\r' characters if there are any, so it > is not as if the code is completely broken. > > But, I think it makes sense to follow the spec, and avoid having different > XML compared to other systems. > > I propose changing the line separator to follow the spec, but this has a > very large impact on anyone who has expectations on JDOM having a particular > line-terminator, even though they shouldn't... You're confusing input with output. \r\n is fully compliant with the XML specification. Line separators can be chosen or changed already by supplying an appropriately configured Format. -- Elliotte Rusty Harold [email protected] _______________________________________________ To control your jdom-interest membership: http://www.jdom.org/mailman/options/jdom-interest/[email protected]