Controlling White-Space Interpretation with the WhitespaceHandling Property

The WhitespaceHandling property provides read and write access to a value that determines how white space will be handled. The WhitespaceHandling property takes an enumeration value of type System.Xml.WhitespaceHandling. Table 10.1 shows the WhitespaceHandling values and how they affect the XmlTextReader.

Table 10.1. The WhitespaceHandling Enumeration Values and Meanings
VALUEEFFECT ON XmlTextReader
AllBoth Whitespace and SignificantWhitespace nodes are returned.
NoneNo Whitespace or SignificantWhitespace nodes are returned.
SignificantOnly SignificantWhitespace is returned.

The WhitespaceHandling property can be changed at any time while parsing and will take effect on the ...

Get Microsoft® .NET Compact Framework Kick Start now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.