[jdom-interest] XMLOutputter and newlines
afterdeclaration/doctype
Elliotte Rusty Harold
elharo at metalab.unc.edu
Thu Dec 19 11:16:07 PST 2002
At 1:06 PM -0500 12/19/02, <Vadim.Strizhevsky at morganstanley.com> wrote:
>Why do you all feel that it is such a big or unusual thing to ask for,
>to be able to produce XML with no white space or newlines? You already
>have API that is supposed to control this, but you arbitrarily decided
>to not observe it in one place. That just doesn't make any logical sense
>to me.
It's not at all arbitrary. White space inside the root element is
very different from white space outside the root element. That's
XML's rules, not ours. JDOM lets you control the white space inside
the root element because that matters. It doesn't let you control the
white space outside the root element because it doesn't matter.
No XML-aware process should care about where white space is placed
outside the root element. You want to use a non-XML aware process to
handle your documents. That's the only reason you're having trouble.
That's outside the scope of what JDOM is trying to do.
--
+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| XML in a Nutshell, 2nd Edition (O'Reilly, 2002) |
| http://www.cafeconleche.org/books/xian2/ |
| http://www.amazon.com/exec/obidos/ISBN%3D0596002920/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