Export (0) Print
Expand All

XmlValidatingReader Class

NOTE: This class is now obsolete.

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

Namespace: System.Xml
Assembly: System.Xml (in system.xml.dll)

[ObsoleteAttribute("Use XmlReader created by XmlReader.Create() method using appropriate XmlReaderSettings instead. http://go.microsoft.com/fwlink/?linkid=14202")] 
public class XmlValidatingReader : XmlReader, IXmlLineInfo, IXmlNamespaceResolver
/** @attribute ObsoleteAttribute("Use XmlReader created by XmlReader.Create() method using appropriate XmlReaderSettings instead. http://go.microsoft.com/fwlink/?linkid=14202") */ 
public class XmlValidatingReader extends XmlReader implements IXmlLineInfo, IXmlNamespaceResolver
ObsoleteAttribute("Use XmlReader created by XmlReader.Create() method using appropriate XmlReaderSettings instead. http://go.microsoft.com/fwlink/?linkid=14202") 
public class XmlValidatingReader extends XmlReader implements IXmlLineInfo, IXmlNamespaceResolver

XmlValidatingReader implements the XmlReader class and provides support for data validation. Use the Schemas property to have the reader validate by using schema files that are 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.

XmlValidatingReader throws an 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 ReadState property to check whether a reader is in error state.

NoteNote

The XmlValidatingReader class is obsolete in Microsoft .NET Framework version 2.0. You can create a validating XmlReader instance by using the XmlReaderSettings class and the Create method. For more information, see Validating XML Data with XmlReader.

Notes to Inheritors This class has an inheritance demand. Full trust is required to inherit from XmlValidatingReader. For more information, see Inheritance Demands.

System.Object
   System.Xml.XmlReader
    System.Xml.XmlValidatingReader

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

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 1.0, 1.1
Obsolete (compiler warning) in 2.0

Community Additions

ADD
Show:
© 2014 Microsoft