O'Reilly logo

Microsoft® .NET Compact Framework Kick Start by Ronnie Yates, Erik Rubin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the XmlTextReader's Namespaces Property

The Namespaces property provides read and write access to a value indicating whether the reader does namespace support. This property is set to true by default, which means that namespaces are supported. If namespace support is turned off, namespace prefixes are not resolved to their respective namespace URIs. Instead, the prefix and local name are considered the local name of the element. This property can be changed only before any read operation has been executed. This means that the XmlTextReader's ReadState property must equal ReadState.Initial. An InvalidOperationException is thrown if the reader is in any other state. Listing 10.4 shows the difference between a namespace-enabled reader and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required