O'Reilly logo

Special Edition Using XML, Second Edition by - et al. David Gulbransen

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 .NET XmlReader Classes

Microsoft supplies three parsers that implement the XmlReader interface (see Figure 17.1):

  • XmlTextReader— The simplest and most straightforward XML parser in .NET XmlTextReader is a one-pass, forward-only parser. XmlTextReader doesn't support validation, cannot expand general entities, and default attributes aren't made available. However, although it has several downsides, the XmlTextReader is an extremely fast and efficient parser.

  • XmlValidatingReader— The XmlValidatingReader uses a parser like the XmlTextReader to add several extended features. First, the XmlValidatingReader validates the document against a Document Type Definition or XML Schema while the document is being parsed. In addition, it adds ...

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