Well,
to be honest, the meaning of pretty print is that you give up space preservation
in order to get a document that's easier to read. If you care about spaces being
preserved, you should _not_ use pretty print. They're exclusive and I am not
sure how would they work together.
However, if you access the document using, say, XmlCursor, then all the
original spaces in the infoset will be there, regardless of the Pretty Print
value.
Radu
-----Original Message-----
From: Buxton, Gretchen C. [mailto:[EMAIL PROTECTED]
Sent: Friday, July 01, 2005 10:01 AM
To: '[email protected]'
Subject: Whitespace is not preservedI have a string element that contains text leading whitespace. When I use XMLOptions setSavePrettyPrint() the spaces within this element are trimmed from the beginning and end of the element. Without setSavePrettyPrint the trimming does not occur.From what I can tell, the data inside the element should fall within the specification for the Infoset so I expected Pretty Print should not affect this data. I have tried adding the <xs:whiteSpace value="preserve" /> to this element definition in my schema and this does not seem to make a difference in the behavior.Can someone explain why this occurs?Here's a relevent fragment from my .xsd.<xs:element name="response"><xs:simpleType><xs:restriction base="xs:string"><xs:whiteSpace value="preserve" /></xs:restriction></xs:simpleType></xs:element>Thanks.****************************************************************************
This email may contain confidential
material. If you were not an intended recipient,
Please notify the sender and delete all copies.
We may monitor email to and from our network.***************************************************************************

