This documentation is archived and is not being maintained.

XmlValidatingReader Class

Represents a reader that provides DTD, XML-Data Reduced (XDR) schema, and XML Schema definition language (XSD) schema validation.

For a list of all members of this type, see XmlValidatingReader Members.


[Visual Basic]
Public Class XmlValidatingReader
   Inherits XmlReader
   Implements IXmlLineInfo
public class XmlValidatingReader : XmlReader, IXmlLineInfo
public __gc class XmlValidatingReader : public XmlReader,
public class XmlValidatingReader extends XmlReader implements

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


XmlValidatingReader implements the XmlReader class and provides support for data validation. Use the Schemas property to have the reader validate using schema files cached in an XmlSchemaCollection. The ValidationType property specifies what type of validation the reader should perform. Setting the property to ValidationType.None creates a non-validating reader.

If you do not need data validation, the ability to resolve general entities, or support for default attributes, use XmlTextReader.

To read XML data from an XmlNode, use XmlNodeReader.

Notes to Inheritors:  This class has an inheritance demand. Full trust is required to inherit from XmlValidatingReader. See Inheritance Demands for more information.


Namespace: System.Xml

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: System.Xml (in System.Xml.dll)

See Also

XmlValidatingReader Members | System.Xml Namespace