Represents a reader that provides document type definition (DTD), XML-Data Reduced (XDR) schema, and XML Schema definition language (XSD) validation.
See Also: XmlValidatingReader Members
XmlValidatingReader implements the System.Xml.XmlReader class and provides support for data validation. Use the XmlValidatingReader.Schemas property to have the reader validate by using schema files that are cached in an System.Xml.Schema.XmlSchemaCollection. The XmlValidatingReader.ValidationType property specifies what type of validation the reader should perform. Setting the property to ValidationType.None creates a non-validating reader.
System.Xml.XmlValidatingReader throws an System.Xml.XmlException on XML parse errors. After an exception is thrown the state of the reader is not predictable. For example, the reported node type may be different than the actual node type of the current node. Use the XmlValidatingReader.ReadState property to check whether a reader is in error state.
The System.Xml.XmlValidatingReader class is obsolete in dnprdnext. You can create a validating System.Xml.XmlReader instance by using the System.Xml.XmlReaderSettings class and the erload:System.Xml.XmlReader.Create method. For more information, see Validating XML Data with XmlReader.