Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

In most cases, the behavior of the Microsoft XML Parser (MSXML) processor conforms to white space handling rules imposed by the XML and XSL Transformations (XSLT) specifications.

The following are the exceptions:

  • Adjacent text nodes are not treated as one node. Adjacent text nodes can appear if:

    • The user inserts them into the tree through the Document Object Model (DOM) application programming interface (API).

    • CDATA sections border #PCDATA nodes.

    • An entity reference containing text borders a #PCDATA or CDATA node. (Character references, such as 
 to represent a newline, are automatically expanded by the parser and handled correctly.)

    Few style sheets will encounter any of these conditions. Furthermore, even if adjacent text nodes exist, users seldom query for text nodes directly. (In most cases, users obtain text nodes by referring to element and attribute nodes.)

  • When the preserveWhitespaceproperty is FALSE, the white space stripped by the DOM is reduced to flags that mark where white space existed. These flags are used to output extra white space when <xsl:copy-of> is used or when the text value of a node is retrieved. These flags act as "virtual" nodes that cannot be queried, but nevertheless behave like text nodes with a value of &#x10; (newline) on output. This does not occur if preserveWhitespaceis TRUE because flags are not used.

  • CDATA nodes containing only white space are never stripped.

Behavior that does not conform to XML and XSL specifications will be corrected in a future release of the MSXML processor.

See Also