[XOM-interest] pretty printing

Elliotte Rusty Harold elharo at metalab.unc.edu
Thu Jan 8 12:28:15 EST 2004


At 12:22 PM -0500 1/8/04, Jacky Lu wrote:
>Hello,
>
>I'm creating XML document using Serializer class. When the indent is set
>to a positive integer, the input whitespaces(including the spaces
>contained in a string value) will not be respected. E.g.
><name>bill            gates</name>
>will be serialized to
><name>
>   bill gates
></name>
>

Add an xml:space="preserve" attribute to the element whose space you 
wish to preserve. .
-- 

   Elliotte Rusty Harold
   elharo at metalab.unc.edu
   Effective XML (Addison-Wesley, 2003)
   http://www.cafeconleche.org/books/effectivexml
   http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA



More information about the XOM-interest mailing list