The XmlValidatingReader Class

The XmlValidatingReader class is an implementation of the XmlReader class that provides support for several types of XML validation: document type definitions (DTDs), XML-Data Reduced (XDR) schemas, and XML Schemas. The XML Schema language is also referred to as XML Schema Definition (XSD). DTD and XSD are official recommendations issued by the W3C, whereas XDR is simply the Microsoft implementation of an early working draft of XML Schemas that will be superseded by XSD as time goes by.

You can use the XmlValidatingReader class to validate entire XML documents as well as XML fragments. An XML fragment is a string of XML code that does not have a root node. For example, the following XML string turns out to be a ...

Get Applied XML Programming for Microsoft® .NET 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.