XmlValidatingReader Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
Use XmlReader created by XmlReader.Create() method using appropriate XmlReaderSettings instead. https://go.microsoft.com/fwlink/?linkid=14202
Caution
XmlValidatingReader has been deprecated. Use XmlReader created by XmlReader.Create() method using appropriate XmlReaderSettings instead.
Caution
Use XmlReader created by XmlReader.Create() method using appropriate XmlReaderSettings instead. http://go.microsoft.com/fwlink/?linkid=14202
Represents a reader that provides document type definition (DTD), XML-Data Reduced (XDR) schema, and XML Schema definition language (XSD) validation.
This class is obsolete. Starting with the .NET Framework 2.0, we recommend that you use the XmlReaderSettings class and the Create method to create a validating XML reader.
public ref class XmlValidatingReader : System::Xml::XmlReader, System::Xml::IXmlLineInfo, System::Xml::IXmlNamespaceResolver
public ref class XmlValidatingReader : System::Xml::XmlReader, System::Xml::IXmlLineInfo
[System.Obsolete("Use XmlReader created by XmlReader.Create() method using appropriate XmlReaderSettings instead. https://go.microsoft.com/fwlink/?linkid=14202")]
public class XmlValidatingReader : System.Xml.XmlReader, System.Xml.IXmlLineInfo, System.Xml.IXmlNamespaceResolver
[System.Obsolete("XmlValidatingReader has been deprecated. Use XmlReader created by XmlReader.Create() method using appropriate XmlReaderSettings instead.")]
public class XmlValidatingReader : System.Xml.XmlReader, System.Xml.IXmlLineInfo, System.Xml.IXmlNamespaceResolver
[System.Obsolete("Use XmlReader created by XmlReader.Create() method using appropriate XmlReaderSettings instead. http://go.microsoft.com/fwlink/?linkid=14202")]
public class XmlValidatingReader : System.Xml.XmlReader, System.Xml.IXmlLineInfo, System.Xml.IXmlNamespaceResolver
public class XmlValidatingReader : System.Xml.XmlReader, System.Xml.IXmlLineInfo
[<System.Obsolete("Use XmlReader created by XmlReader.Create() method using appropriate XmlReaderSettings instead. https://go.microsoft.com/fwlink/?linkid=14202")>]
type XmlValidatingReader = class
inherit XmlReader
interface IXmlLineInfo
interface IXmlNamespaceResolver
[<System.Obsolete("XmlValidatingReader has been deprecated. Use XmlReader created by XmlReader.Create() method using appropriate XmlReaderSettings instead.")>]
type XmlValidatingReader = class
inherit XmlReader
interface IXmlLineInfo
interface IXmlNamespaceResolver
[<System.Obsolete("Use XmlReader created by XmlReader.Create() method using appropriate XmlReaderSettings instead. http://go.microsoft.com/fwlink/?linkid=14202")>]
type XmlValidatingReader = class
inherit XmlReader
interface IXmlLineInfo
interface IXmlNamespaceResolver
type XmlValidatingReader = class
inherit XmlReader
interface IXmlLineInfo
Public Class XmlValidatingReader
Inherits XmlReader
Implements IXmlLineInfo, IXmlNamespaceResolver
Public Class XmlValidatingReader
Inherits XmlReader
Implements IXmlLineInfo
- Inheritance
- Attributes
- Implements
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.
Note
The XmlValidatingReader class is obsolete in .NET Framework 2.0. You can create a validating XmlReader instance by using the XmlReaderSettings class and the Create method. For more information, see the Remarks section of the XmlReader reference page.
This class has an inheritance demand. Full trust is required to inherit from XmlValidatingReader
.
Xml |
Initializes a new instance of the |
Xml |
Initializes a new instance of the |
Xml |
Initializes a new instance of the |
Attribute |
Gets the number of attributes on the current node. |
BaseURI |
Gets the base URI of the current node. |
Can |
Gets a value indicating whether the XmlValidatingReader implements the binary content read methods. |
Can |
Gets a value indicating whether the XmlReader implements the binary content read methods. (Inherited from XmlReader) |
Can |
Gets a value indicating whether the XmlReader implements the ReadValueChunk(Char[], Int32, Int32) method. (Inherited from XmlReader) |
Can |
Gets a value indicating whether this reader can parse and resolve entities. |
Depth |
Gets the depth of the current node in the XML document. |
Encoding |
Gets the encoding attribute for the document. |
Entity |
Gets or sets a value that specifies how the reader handles entities. |
EOF |
Gets a value indicating whether the reader is positioned at the end of the stream. |
Has |
Gets a value indicating whether the current node has any attributes. (Inherited from XmlReader) |
Has |
Gets a value indicating whether the current node can have a Value other than String.Empty. |
Is |
Gets a value indicating whether the current node is an attribute that was generated from the default value defined in the document type definition (DTD) or schema. |
Is |
Gets a value indicating whether the current node is an empty element (for example, |
Item[Int32] |
Gets the value of the attribute with the specified index. |
Item[Int32] |
When overridden in a derived class, gets the value of the attribute with the specified index. (Inherited from XmlReader) |
Item[String, String] |
Gets the value of the attribute with the specified local name and namespace URI. |
Item[String, String] |
When overridden in a derived class, gets the value of the attribute with the specified LocalName and NamespaceURI. (Inherited from XmlReader) |
Item[String] |
Gets the value of the attribute with the specified name. |
Item[String] |
When overridden in a derived class, gets the value of the attribute with the specified Name. (Inherited from XmlReader) |
Line |
Gets the current line number. |
Line |
Gets the current line position. |
Local |
Gets the local name of the current node. |
Name |
Gets the qualified name of the current node. |
Namespaces |
Gets or sets a value indicating whether to do namespace support. |
NamespaceURI |
Gets the namespace Uniform Resource Identifier (URI) (as defined in the World Wide Web Consortium (W3C) Namespace specification) of the node on which the reader is positioned. |
Name |
Gets the XmlNameTable associated with this implementation. |
Node |
Gets the type of the current node. |
Prefix |
Gets the namespace prefix associated with the current node. |
Quote |
Gets the quotation mark character used to enclose the value of an attribute node. |
Reader |
Gets the XmlReader used to construct this |
Read |
Gets the state of the reader. |
Schema |
Gets the schema information that has been assigned to the current node as a result of schema validation. (Inherited from XmlReader) |
Schemas |
Gets a XmlSchemaCollection to use for validation. |
Schema |
Gets a schema type object. |
Settings |
Gets the XmlReaderSettings object that was used to create this XmlValidatingReader instance. |
Settings |
Gets the XmlReaderSettings object used to create this XmlReader instance. (Inherited from XmlReader) |
Validation |
Gets or sets a value indicating the type of validation to perform. |
Value |
Gets the text value of the current node. |
Value |
Gets The Common Language Runtime (CLR) type for the current node. (Inherited from XmlReader) |
Xml |
Gets the current |
Xml |
Sets the XmlResolver used for resolving external document type definition (DTD) and schema location references. The |
Xml |
Gets the current |
Close() |
Changes the ReadState to Closed. |
Dispose() |
Releases all resources used by the current instance of the XmlReader class. (Inherited from XmlReader) |
Dispose(Boolean) |
Releases the unmanaged resources used by the XmlReader and optionally releases the managed resources. (Inherited from XmlReader) |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Get |
Gets the value of the attribute with the specified index. |
Get |
Gets the value of the attribute with the specified local name and namespace Uniform Resource Identifier (URI). |
Get |
Gets the value of the attribute with the specified name. |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Get |
Asynchronously gets the value of the current node. (Inherited from XmlReader) |
Has |
Gets a value indicating whether the class can return line information. |
Is |
Calls MoveToContent() and tests if the current content node is a start tag or empty element tag. (Inherited from XmlReader) |
Is |
Calls MoveToContent() and tests if the current content node is a start tag or empty element tag and if the LocalName and NamespaceURI properties of the element found match the given strings. (Inherited from XmlReader) |
Is |
Calls MoveToContent() and tests if the current content node is a start tag or empty element tag and if the Name property of the element found matches the given argument. (Inherited from XmlReader) |
Lookup |
Resolves a namespace prefix in the current element's scope. |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
Move |
Moves to the attribute with the specified index. |
Move |
Moves to the attribute with the specified local name and namespace Uniform Resource Identifier (URI). |
Move |
Moves to the attribute with the specified name. |
Move |
Checks whether the current node is a content (non-white space text, |
Move |
Asynchronously checks whether the current node is a content node. If the node is not a content node, the reader skips ahead to the next content node or end of file. (Inherited from XmlReader) |
Move |
Moves to the element that contains the current attribute node. |
Move |
Moves to the first attribute. |
Move |
Moves to the next attribute. |
Read() |
Reads the next node from the stream. |
Read |
Asynchronously reads the next node from the stream. (Inherited from XmlReader) |
Read |
Parses the attribute value into one or more |
Read |
Reads the content as an object of the type specified. (Inherited from XmlReader) |
Read |
Asynchronously reads the content as an object of the type specified. (Inherited from XmlReader) |
Read |
Reads the content and returns the Base64 decoded binary bytes. |
Read |
Reads the content and returns the Base64 decoded binary bytes. (Inherited from XmlReader) |
Read |
Asynchronously reads the content and returns the Base64 decoded binary bytes. (Inherited from XmlReader) |
Read |
Reads the content and returns the BinHex decoded binary bytes. |
Read |
Reads the content and returns the |
Read |
Asynchronously reads the content and returns the |
Read |
Reads the text content at the current position as a |
Read |
Reads the text content at the current position as a DateTime object. (Inherited from XmlReader) |
Read |
Reads the text content at the current position as a DateTimeOffset object. (Inherited from XmlReader) |
Read |
Reads the text content at the current position as a Decimal object. (Inherited from XmlReader) |
Read |
Reads the text content at the current position as a double-precision floating-point number. (Inherited from XmlReader) |
Read |
Reads the text content at the current position as a single-precision floating point number. (Inherited from XmlReader) |
Read |
Reads the text content at the current position as a 32-bit signed integer. (Inherited from XmlReader) |
Read |
Reads the text content at the current position as a 64-bit signed integer. (Inherited from XmlReader) |
Read |
Reads the text content at the current position as an Object. (Inherited from XmlReader) |
Read |
Asynchronously reads the text content at the current position as an Object. (Inherited from XmlReader) |
Read |
Reads the text content at the current position as a String object. (Inherited from XmlReader) |
Read |
Asynchronously reads the text content at the current position as a String object. (Inherited from XmlReader) |
Read |
Checks that the specified local name and namespace URI matches that of the current element, then reads the element content as the requested type. (Inherited from XmlReader) |
Read |
Reads the element content as the requested type. (Inherited from XmlReader) |
Read |
Asynchronously reads the element content as the requested type. (Inherited from XmlReader) |
Read |
Reads the element and decodes the Base64 content. |
Read |
Reads the element and decodes the |
Read |
Asynchronously reads the element and decodes the |
Read |
Reads the element and decodes the BinHex content. |
Read |
Reads the element and decodes the |
Read |
Asynchronously reads the element and decodes the |
Read |
Reads the current element and returns the contents as a Boolean object. (Inherited from XmlReader) |
Read |
Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a Boolean object. (Inherited from XmlReader) |
Read |
Reads the current element and returns the contents as a DateTime object. (Inherited from XmlReader) |
Read |
Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a DateTime object. (Inherited from XmlReader) |
Read |
Reads the current element and returns the contents as a Decimal object. (Inherited from XmlReader) |
Read |
Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a Decimal object. (Inherited from XmlReader) |
Read |
Reads the current element and returns the contents as a double-precision floating-point number. (Inherited from XmlReader) |
Read |
Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a double-precision floating-point number. (Inherited from XmlReader) |
Read |
Reads the current element and returns the contents as single-precision floating-point number. (Inherited from XmlReader) |
Read |
Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a single-precision floating-point number. (Inherited from XmlReader) |
Read |
Reads the current element and returns the contents as a 32-bit signed integer. (Inherited from XmlReader) |
Read |
Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a 32-bit signed integer. (Inherited from XmlReader) |
Read |
Reads the current element and returns the contents as a 64-bit signed integer. (Inherited from XmlReader) |
Read |
Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a 64-bit signed integer. (Inherited from XmlReader) |
Read |
Reads the current element and returns the contents as an Object. (Inherited from XmlReader) |
Read |
Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as an Object. (Inherited from XmlReader) |
Read |
Asynchronously reads the current element and returns the contents as an Object. (Inherited from XmlReader) |
Read |
Reads the current element and returns the contents as a String object. (Inherited from XmlReader) |
Read |
Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a String object. (Inherited from XmlReader) |
Read |
Asynchronously reads the current element and returns the contents as a String object. (Inherited from XmlReader) |
Read |
Reads a text-only element. However, we recommend that you use the ReadElementContentAsString() method instead, because it provides a more straightforward way to handle this operation. (Inherited from XmlReader) |
Read |
Checks that the LocalName and NamespaceURI properties of the element found matches the given strings before reading a text-only element. However, we recommend that you use the ReadElementContentAsString(String, String) method instead, because it provides a more straightforward way to handle this operation. (Inherited from XmlReader) |
Read |
Checks that the Name property of the element found matches the given string before reading a text-only element. However, we recommend that you use the ReadElementContentAsString() method instead, because it provides a more straightforward way to handle this operation. (Inherited from XmlReader) |
Read |
Checks that the current content node is an end tag and advances the reader to the next node. (Inherited from XmlReader) |
Read |
When overridden in a derived class, reads all the content, including markup, as a string. (Inherited from XmlReader) |
Read |
Asynchronously reads all the content, including markup, as a string. (Inherited from XmlReader) |
Read |
When overridden in a derived class, reads the content, including markup, representing this node and all its children. (Inherited from XmlReader) |
Read |
Asynchronously reads the content, including markup, representing this node and all its children. (Inherited from XmlReader) |
Read |
Checks that the current node is an element and advances the reader to the next node. (Inherited from XmlReader) |
Read |
Checks that the current content node is an element with the given LocalName and NamespaceURI and advances the reader to the next node. (Inherited from XmlReader) |
Read |
Checks that the current content node is an element with the given Name and advances the reader to the next node. (Inherited from XmlReader) |
Read |
Reads the contents of an element or text node as a string. |
Read |
Returns a new |
Read |
Advances the XmlReader to the next descendant element with the specified local name and namespace URI. (Inherited from XmlReader) |
Read |
Advances the XmlReader to the next descendant element with the specified qualified name. (Inherited from XmlReader) |
Read |
Reads until an element with the specified local name and namespace URI is found. (Inherited from XmlReader) |
Read |
Reads until an element with the specified qualified name is found. (Inherited from XmlReader) |
Read |
Advances the |
Read |
Advances the |
Read |
Gets the common language runtime type for the specified XML Schema definition language (XSD) type. |
Read |
Reads large streams of text embedded in an XML document. (Inherited from XmlReader) |
Read |
Asynchronously reads large streams of text embedded in an XML document. (Inherited from XmlReader) |
Resolve |
Resolves the entity reference for |
Skip() |
Skips the children of the current node. (Inherited from XmlReader) |
Skip |
Asynchronously skips the children of the current node. (Inherited from XmlReader) |
To |
Returns a string that represents the current object. (Inherited from Object) |
Validation |
Sets an event handler for receiving information about document type definition (DTD), XML-Data Reduced (XDR) schema, and XML Schema definition language (XSD) schema validation errors. |
IDisposable. |
For a description of this member, see Dispose(). (Inherited from XmlReader) |
IXml |
Gets a value indicating whether the class can return line information. |
IXml |
For a description of this member, see GetNamespacesInScope(XmlNamespaceScope). |
IXml |
For a description of this member, see LookupNamespace(String). |
IXml |
For a description of this member, see LookupPrefix(String). |
Product | Versions (Obsolete) |
---|---|
.NET | (Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9) |
.NET Framework | 1.1 (2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1) |
.NET Standard | (2.0, 2.1) |
.NET feedback
.NET is an open source project. Select a link to provide feedback: