Share via


preserveWhiteSpace Property (Windows Embedded CE 6.0)

1/6/2010

Specifies the default white space handling.

Script Syntax

            boolVal = objXMLDOMDocument.preserveWhiteSpace;
objXMLDOMDocument.preserveWhiteSpace = boolVal;

Remarks

Ee502364.collapse(en-US,WinEmbedded.60).gifScript Parameters

None.

Ee502364.collapse(en-US,WinEmbedded.60).gifScript Return Value

Boolean. Value that indicates whether default processing preserves white space. Default is False.

Ee502364.collapse(en-US,WinEmbedded.60).gifC/C++ Syntax

HRESULT get_preserveWhiteSpace(
  VARIANT_BOOL* isPreserving
);
HRESULT put_preserveWhiteSpace(
  VARIANT_BOOL isPreserving
);

Remarks

Ee502364.collapse(en-US,WinEmbedded.60).gifC/C++ Parameters

  • isPreserving
    [out, retval][in] Value that indicates whether default processing preserves white space.

Ee502364.collapse(en-US,WinEmbedded.60).gifC/C++ Return Values

  • S_OK
    Value returned if successful.
  • E_INVALIDARG (for get_preserveWhiteSpace only)
    Value returned if isPreserving is Null.

Ee502364.collapse(en-US,WinEmbedded.60).gifRequirements

Header msxml2.h, msxml2.idl
Windows Embedded CE Windows CE .NET 4.0 and later

General Remarks

This property is initialized to False.

The preserveWhiteSpace property specifies the default white space handling. When preserveWhiteSpace is True, all white space is preserved, regardless of any xml:space attributes specified in the document type definition (DTD). It is the equivalent of having an xml:space= "preserve" attribute on every element.

When preserveWhiteSpace is False, the values of any xml:space attributes determine where white space is preserved.

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. In a similar way, 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 preserveWhiteSpace property is set to True and xml:space on the XML element has the value "preserve."

This member is an extension of the World Wide Web Consortium (W3C) Document Object Model (DOM).

This property is read/write, and applies to the following interface:

DOMDocument.

See Also

Reference

XML DOM Properties

Other Resources

TEXT
XML