I 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.
***************************************************************************

