Indicates whether to preserve all white space in the XML document.
boolValue = oXMLDOMDocument.preserveWhiteSpace
HRESULT get_preserveWhiteSpace( VARIANT_BOOL *isPreserving);
Sets the value of the preserveWhiteSpace property.
objXMLDOMDocument.preserveWhiteSpace = boolValue
HRESULT put_preserveWhiteSpace( VARIANT_BOOL isPreserving);
Returns S_OK if successful, or an error code otherwise.
This property is initialized to False.
The preserveWhiteSpace property specifies the default white space handling when the xml:space attribute is set to "default." When preserveWhiteSpace is True, all white space is preserved, regardless of the xml:space settings in the document. When preserveWhiteSpace is False, the values of the xml:space attribute specified in the document determine whether white space is preserved or not.
The xml property does not preserve white space exactly as it appears in the original document. Instead, the object model replaces white space present in the original document with a single newline character in the representation returned by the xml property. Similarly, the text property contains a representation without the leading and trailing spaces and replaces multiple intervening white space characters between words with a single space character.
The text and xml properties preserve white space when the user has set the preserveWhiteSpace property to True and when xml:space on the XML element has the value "preserve".
IXMLDOMDocument Interface | Handling White Space