[jdom-interest] XMLOutputter

Elliotte Rusty Harold elharo at metalab.unc.edu
Thu Feb 12 07:26:00 PST 2004

At 8:00 AM -0500 2/12/04, Rolf Lear wrote:
>You have a bunch of problems ....
>Firstly, white-space in XML has no meaning unless specifically requested
>(xml:space="preserve"). Thus, the following two XML documents are
>   <element>text</element>

This statement is false. The two document above are *not* equivalent, 
at least at the level of XML.

Conformant XML parsers preserve and report all white space in XML 
content (i.e. outside of tags) regardless of the setting of 
xml:space, or its presence or absence. The interpretation of that 
white space is an aplicaiton level decision made by each program that 
reads the XML through a parser, as in the interpreation of any other 
non-whitespace data. See Chapter 10 of Effective XML for more 
elaboration of this point.


   Elliotte Rusty Harold
   elharo at metalab.unc.edu
   Effective XML (Addison-Wesley, 2003)

More information about the jdom-interest mailing list