[jdom-interest] Default line separator in XMLOutputter
Elliotte Rusty Harold
elharo at metalab.unc.edu
Wed Apr 16 06:41:48 PDT 2003
>Does anyone know why the line separator (STANDARD_LINE_SEPARATOR)
>default value is set to "\r\n" in XMLOutputter rather than using the
>platform default (system property "line.seperator")?
1. It's more interoperable across platforms to specify a line end
separator. Code that uses XMLOutputter should not produce different
output depending on which platform it's run on.
2. \r\n is the standard line ending convention of most network
protocols such as HTTP.
--
+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| Processing XML with Java (Addison-Wesley, 2002) |
| http://www.cafeconleche.org/books/xmljava |
| http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://www.cafeaulait.org/ |
| Read Cafe con Leche for XML News: http://www.cafeconleche.org/ |
+----------------------------------+---------------------------------+
More information about the jdom-interest
mailing list