O'Reilly logo

Applied XML Programming for Microsoft® .NET by Dino Esposito

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

Parsing with the XmlTextReader Class

The XmlTextReader class is designed to provide fast access to streams of XML data in a forward-only and read-only manner. The reader verifies that the submitted XML is well-formed. It also performs a quick check for correctness on the referenced DTD, if one exists. In no case, though, does this reader validate against a schema or DTD. If you need more functionality (for example, validation), you must resort to other reader classes such as XmlNodeReader or XmlValidatingReader.

An instance of the XmlTextReader class can be created in a number of ways and from a variety of sources, including disk files, URLs, streams, and text readers. To process an XML file, you start by instantiating the constructor, as shown ...

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