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

.NET Parsing with Validation in .NET with XmlValidatingReader

The XmlTextReader covered in the previous section is an extremely fast and efficient parser, but it does have the downside of not doing any validation of the XML document. The .NET XML architecture provides a higher-level parser called XmlValidatingReader that provides this functionality. We will investigate the XmlValidatingReader in this section and use it to create an example that checks the validity of a document using a DTD.

The XmlValidatingReader doesn't parse text directly. Instead, it relies on another XmlReader like XmlTextReader for that lower-level functionality. Because we've just covered the XmlTextReader in the last section, that is the parser we'll use for our example. ...

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