XmlValidatingReader 类

定义

警告

此 API 现已过时。

表示提供文档类型定义 (DTD)、XML 数据简化 (XDR) 架构和 XML 架构定义语言 (XSD) 验证的读取器。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. 从 .NET Framework 2.0 开始,建议你使用 XmlReaderSettings 类和 Create 方法创建一个验证的 XML 读取器。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
[System.Obsolete("Use XmlReader created by XmlReader.Create() method using appropriate XmlReaderSettings instead. https://go.microsoft.com/fwlink/?linkid=14202")]
[System.Obsolete("Use XmlReader created by XmlReader.Create() method using appropriate XmlReaderSettings instead. https://go.microsoft.com/fwlink/?linkid=14202")]
[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
type XmlValidatingReader = class
    inherit XmlReader
    interface IXmlLineInfo
    interface IXmlNamespaceResolver
Public Class XmlValidatingReader
Inherits XmlReader
Implements IXmlLineInfo, IXmlNamespaceResolver
继承
XmlValidatingReader
属性
实现

注解

XmlValidatingReader 实现 XmlReader 类,并提供对数据验证的支持。XmlValidatingReader implements the XmlReader class and provides support for data validation. 使用 Schemas 属性,使读取器使用 XmlSchemaCollection中缓存的架构文件进行验证。Use the Schemas property to have the reader validate by using schema files that are cached in an XmlSchemaCollection. ValidationType 属性指定读取器应执行的验证类型。The ValidationType property specifies what type of validation the reader should perform. 将属性设置为 ValidationType 可创建非验证读取器。Setting the property to ValidationType.None creates a non-validating reader.

XmlValidatingReader 引发 XML 分析错误的 XmlExceptionXmlValidatingReader 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. 使用 ReadState 属性检查读取器是否处于错误状态。Use the ReadState property to check whether a reader is in error state.

备注

XmlValidatingReader 类在 .NET Framework 2.0.NET Framework 2.0中已过时。The XmlValidatingReader class is obsolete in .NET Framework 2.0.NET Framework 2.0. 您可以通过使用 XmlReaderSettings 类和 Create 方法来创建验证 XmlReader 实例。You can create a validating XmlReader instance by using the XmlReaderSettings class and the Create method. 有关详细信息,请参阅 XmlReader 引用页的“备注”部分。For more information, see the Remarks section of the XmlReader reference page.

继承者说明

此类具有继承要求。This class has an inheritance demand. XmlValidatingReader继承需要完全信任。Full trust is required to inherit from XmlValidatingReader.

构造函数

XmlValidatingReader(Stream, XmlNodeType, XmlParserContext)

使用指定的值初始化 XmlValidatingReader 类的新实例。Initializes a new instance of the XmlValidatingReader class with the specified values.

XmlValidatingReader(String, XmlNodeType, XmlParserContext)

使用指定的值初始化 XmlValidatingReader 类的新实例。Initializes a new instance of the XmlValidatingReader class with the specified values.

XmlValidatingReader(XmlReader)

初始化 XmlValidatingReader 类的新实例,该类验证从给定的 XmlReader 返回的内容。Initializes a new instance of the XmlValidatingReader class that validates the content returned from the given XmlReader.

属性

AttributeCount

获取当前节点上的属性数目。Gets the number of attributes on the current node.

BaseURI

获取当前节点的基 URI。Gets the base URI of the current node.

CanReadBinaryContent

获取一个值,该值指示 XmlValidatingReader 是否实现二进制内容读取方法。Gets a value indicating whether the XmlValidatingReader implements the binary content read methods.

CanReadValueChunk

获取一个值,该值指示 XmlReader 是否实现 ReadValueChunk(Char[], Int32, Int32) 方法。Gets a value indicating whether the XmlReader implements the ReadValueChunk(Char[], Int32, Int32) method.

(继承自 XmlReader)
CanResolveEntity

获取一个值,该值指示此读取器是否可以分析和解析实体。Gets a value indicating whether this reader can parse and resolve entities.

Depth

获取 XML 文档中当前节点的深度。Gets the depth of the current node in the XML document.

Encoding

获取文档的编码属性。Gets the encoding attribute for the document.

EntityHandling

获取或设置一个值,该值指定读取器处理实体的方式。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.

HasAttributes

获取一个值,该值指示当前节点是否有任何属性。Gets a value indicating whether the current node has any attributes.

(继承自 XmlReader)
HasValue

获取一个值,该值指示当前节点是否可以具有 String.Empty 以外的 ValueGets a value indicating whether the current node can have a Value other than String.Empty.

IsDefault

获取一个值,该值指示当前节点是否是从文档类型定义 (DTD) 或架构中定义的默认值生成的属性。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.

IsEmptyElement

获取一个值,该值指示当前节点是否为空元素(例如 <MyElement/>)。Gets a value indicating whether the current node is an empty element (for example, <MyElement/>).

Item[Int32]

获取具有指定索引的属性的值。Gets the value of the attribute with the specified index.

Item[String, String]

获取具有指定本地名称和命名空间 URI 的属性的值。Gets the value of the attribute with the specified local name and namespace URI.

Item[String]

获取具有指定名称的属性的值。Gets the value of the attribute with the specified name.

LineNumber

获取当前行号。Gets the current line number.

LinePosition

获取当前行位置。Gets the current line position.

LocalName

获取当前节点的本地名称。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

对于读取器定位到的节点,按照万维网联合会 (W3C) 命名空间规范的定义,获取该节点的命名空间统一资源标识符 (URI)。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.

NameTable

获取与此实现关联的 XmlNameTableGets the XmlNameTable associated with this implementation.

NodeType

获取当前节点的类型。Gets the type of the current node.

Prefix

获取与当前节点关联的命名空间前缀。Gets the namespace prefix associated with the current node.

QuoteChar

获取用于括起属性节点的值的引号字符。Gets the quotation mark character used to enclose the value of an attribute node.

Reader

获取用于构造此 XmlReaderXmlValidatingReaderGets the XmlReader used to construct this XmlValidatingReader.

ReadState

获取读取器的状态。Gets the state of the reader.

SchemaInfo

获取作为架构验证结果分配给当前节点的架构信息。Gets the schema information that has been assigned to the current node as a result of schema validation.

(继承自 XmlReader)
Schemas

获取一个用于验证的 XmlSchemaCollectionGets a XmlSchemaCollection to use for validation.

SchemaType

获取架构类型对象。Gets a schema type object.

Settings

获取用于创建此 XmlReaderSettings 实例的 XmlValidatingReader 对象。Gets the XmlReaderSettings object that was used to create this XmlValidatingReader instance.

ValidationType

获取或设置一个值,该值指示要执行的验证的类型。Gets or sets a value indicating the type of validation to perform.

Value

获取当前节点的文本值。Gets the text value of the current node.

ValueType

获取当前节点的公共语言运行时 (CLR) 类型。Gets The Common Language Runtime (CLR) type for the current node.

(继承自 XmlReader)
XmlLang

获取当前 xml:lang 范围。Gets the current xml:lang scope.

XmlResolver

设置用于解析外部文档类型定义 (DTD) 和架构位置引用的 XmlResolverSets the XmlResolver used for resolving external document type definition (DTD) and schema location references. XmlResolver 用于处理 XML 架构定义语言 (XSD) 架构中找到的任何 import 或 include 元素。The XmlResolver is also used to handle any import or include elements found in XML Schema definition language (XSD) schemas.

XmlSpace

获取当前 xml:space 范围。Gets the current xml:space scope.

方法

Close()

ReadState 更改为“已关闭”。Changes the ReadState to Closed.

Dispose()

释放 XmlReader 类的当前实例所使用的所有资源。Releases all resources used by the current instance of the XmlReader class.

(继承自 XmlReader)
Dispose(Boolean)

释放由 XmlReader 占用的非托管资源,还可以另外再释放托管资源。Releases the unmanaged resources used by the XmlReader and optionally releases the managed resources.

(继承自 XmlReader)
Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetAttribute(Int32)

获取具有指定索引的属性的值。Gets the value of the attribute with the specified index.

GetAttribute(String)

获取具有指定名称的属性的值。Gets the value of the attribute with the specified name.

GetAttribute(String, String)

获取具有指定的本地名称和命名空间统一资源标识符 (URI) 的属性的值。Gets the value of the attribute with the specified local name and namespace Uniform Resource Identifier (URI).

GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
GetValueAsync()

异步获取当前节点的值。Asynchronously gets the value of the current node.

(继承自 XmlReader)
HasLineInfo()

获取一个值,该值指示该类是否可返回行信息。Gets a value indicating whether the class can return line information.

IsStartElement()

调用 MoveToContent() 并测试当前内容节点是否是开始标记或空元素标记。Calls MoveToContent() and tests if the current content node is a start tag or empty element tag.

(继承自 XmlReader)
IsStartElement(String)

调用 MoveToContent() 并测试当前内容节点是否是开始标记或空元素标记,以及所找到元素的 Name 属性是否与给定的参数匹配。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.

(继承自 XmlReader)
IsStartElement(String, String)

调用 MoveToContent() 并测试当前内容节点是否是开始标记或空元素标记,以及所找到元素的 LocalNameNamespaceURI 属性是否与给定的字符串匹配。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.

(继承自 XmlReader)
LookupNamespace(String)

解析当前元素的范围内的命名空间前缀。Resolves a namespace prefix in the current element's scope.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
MoveToAttribute(Int32)

移动到具有指定索引的属性。Moves to the attribute with the specified index.

MoveToAttribute(String)

移动到具有指定名称的属性。Moves to the attribute with the specified name.

MoveToAttribute(String, String)

移动到具有指定的本地名称和命名空间统一资源标识符 (URI) 的属性。Moves to the attribute with the specified local name and namespace Uniform Resource Identifier (URI).

MoveToContent()

检查当前节点是否是内容(非空白文本、CDATAElementEndElementEntityReferenceEndEntity)节点。Checks whether the current node is a content (non-white space text, CDATA, Element, EndElement, EntityReference, or EndEntity) node. 如果此节点不是内容节点,则读取器向前跳至下一个内容节点或文件结尾。If the node is not a content node, the reader skips ahead to the next content node or end of file. 它跳过以下类型的节点:ProcessingInstructionDocumentTypeCommentWhitespaceSignificantWhitespaceIt skips over nodes of the following type: ProcessingInstruction, DocumentType, Comment, Whitespace, or SignificantWhitespace.

(继承自 XmlReader)
MoveToContentAsync()

异步检查当前节点是否为内容节点。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.

(继承自 XmlReader)
MoveToElement()

移动到包含当前属性节点的元素。Moves to the element that contains the current attribute node.

MoveToFirstAttribute()

移动到第一个属性。Moves to the first attribute.

MoveToNextAttribute()

移动到下一个属性。Moves to the next attribute.

Read()

从流中读取下一个节点。Reads the next node from the stream.

ReadAsync()

异步读取该流的下一个节点。Asynchronously reads the next node from the stream.

(继承自 XmlReader)
ReadAttributeValue()

将属性值分析为一个或多个 TextEntityReferenceEndEntity 节点。Parses the attribute value into one or more Text, EntityReference, or EndEntity nodes.

ReadContentAs(Type, IXmlNamespaceResolver)

将内容作为指定类型的对象读取。Reads the content as an object of the type specified.

(继承自 XmlReader)
ReadContentAsAsync(Type, IXmlNamespaceResolver)

将内容作为指定类型的对象异步读取。Asynchronously reads the content as an object of the type specified.

(继承自 XmlReader)
ReadContentAsBase64(Byte[], Int32, Int32)

读取内容并返回 Base64 解码的二进制字节。Reads the content and returns the Base64 decoded binary bytes.

ReadContentAsBase64Async(Byte[], Int32, Int32)

异步读取内容并返回 Base64 解码的二进制字节。Asynchronously reads the content and returns the Base64 decoded binary bytes.

(继承自 XmlReader)
ReadContentAsBinHex(Byte[], Int32, Int32)

读取内容并返回 BinHex 解码的二进制字节。Reads the content and returns the BinHex decoded binary bytes.

ReadContentAsBinHexAsync(Byte[], Int32, Int32)

异步读取内容并返回 BinHex 解码的二进制字节。Asynchronously reads the content and returns the BinHex decoded binary bytes.

(继承自 XmlReader)
ReadContentAsBoolean()

将当前位置的文本内容作为 Boolean 读取。Reads the text content at the current position as a Boolean.

(继承自 XmlReader)
ReadContentAsDateTime()

将当前位置的文本内容作为 DateTime 对象读取。Reads the text content at the current position as a DateTime object.

(继承自 XmlReader)
ReadContentAsDateTimeOffset()

将当前位置的文本内容作为 DateTimeOffset 对象读取。Reads the text content at the current position as a DateTimeOffset object.

(继承自 XmlReader)
ReadContentAsDecimal()

将当前位置的文本内容作为 Decimal 对象读取。Reads the text content at the current position as a Decimal object.

(继承自 XmlReader)
ReadContentAsDouble()

将当前位置的文本内容作为双精度浮点数读取。Reads the text content at the current position as a double-precision floating-point number.

(继承自 XmlReader)
ReadContentAsFloat()

将当前位置的文本内容作为单精度浮点数读取。Reads the text content at the current position as a single-precision floating point number.

(继承自 XmlReader)
ReadContentAsInt()

将当前位置的文本内容作为 32 位有符号整数读取。Reads the text content at the current position as a 32-bit signed integer.

(继承自 XmlReader)
ReadContentAsLong()

将当前位置的文本内容作为 64 位有符号整数读取。Reads the text content at the current position as a 64-bit signed integer.

(继承自 XmlReader)
ReadContentAsObject()

将当前位置的文本内容作为 Object 读取。Reads the text content at the current position as an Object.

(继承自 XmlReader)
ReadContentAsObjectAsync()

将当前位置的文本内容作为 Object 对象异步读取。Asynchronously reads the text content at the current position as an Object.

(继承自 XmlReader)
ReadContentAsString()

将当前位置的文本内容作为 String 对象读取。Reads the text content at the current position as a String object.

(继承自 XmlReader)
ReadContentAsStringAsync()

将当前位置的文本内容作为 String 对象异步读取。Asynchronously reads the text content at the current position as a String object.

(继承自 XmlReader)
ReadElementContentAs(Type, IXmlNamespaceResolver)

将元素内容作为请求类型读取。Reads the element content as the requested type.

(继承自 XmlReader)
ReadElementContentAs(Type, IXmlNamespaceResolver, String, String)

检查指定的本地名称和命名空间 URI 与当前元素的本地名称和命名空间 URI 是否匹配,然后将元素内容作为请求类型读取。Checks that the specified local name and namespace URI matches that of the current element, then reads the element content as the requested type.

(继承自 XmlReader)
ReadElementContentAsAsync(Type, IXmlNamespaceResolver)

将元素内容作为请求类型异步读取。Asynchronously reads the element content as the requested type.

(继承自 XmlReader)
ReadElementContentAsBase64(Byte[], Int32, Int32)

读取元素并对 Base64 内容进行解码。Reads the element and decodes the Base64 content.

ReadElementContentAsBase64Async(Byte[], Int32, Int32)

异步读取元素并对 Base64 内容进行解码。Asynchronously reads the element and decodes the Base64 content.

(继承自 XmlReader)
ReadElementContentAsBinHex(Byte[], Int32, Int32)

读取元素并对 BinHex 内容进行解码。Reads the element and decodes the BinHex content.

ReadElementContentAsBinHexAsync(Byte[], Int32, Int32)

异步读取元素并对 BinHex 内容进行解码。Asynchronously reads the element and decodes the BinHex content.

(继承自 XmlReader)
ReadElementContentAsBoolean()

读取当前元素并将内容作为 Boolean 对象返回。Reads the current element and returns the contents as a Boolean object.

(继承自 XmlReader)
ReadElementContentAsBoolean(String, String)

检查指定的本地名称和命名空间 URI 与当前元素的本地名称和命名空间 URI 是否匹配,然后读取当前元素,并将内容作为 Boolean 对象返回。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.

(继承自 XmlReader)
ReadElementContentAsDateTime()

读取当前元素并将内容作为 DateTime 对象返回。Reads the current element and returns the contents as a DateTime object.

(继承自 XmlReader)
ReadElementContentAsDateTime(String, String)

检查指定的本地名称和命名空间 URI 与当前元素的本地名称和命名空间 URI 是否匹配,然后读取当前元素,并将内容作为 DateTime 对象返回。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.

(继承自 XmlReader)
ReadElementContentAsDecimal()

读取当前元素并将内容作为 Decimal 对象返回。Reads the current element and returns the contents as a Decimal object.

(继承自 XmlReader)
ReadElementContentAsDecimal(String, String)

检查指定的本地名称和命名空间 URI 与当前元素的本地名称和命名空间 URI 是否匹配,然后读取当前元素,并将内容作为 Decimal 对象返回。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.

(继承自 XmlReader)
ReadElementContentAsDouble()

读取当前元素并将内容作为双精度浮点数返回。Reads the current element and returns the contents as a double-precision floating-point number.

(继承自 XmlReader)
ReadElementContentAsDouble(String, String)

检查指定的本地名称和命名空间 URI 与当前元素的本地名称和命名空间 URI 是否匹配,然后读取当前元素,并将内容作为双精度浮点数返回。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.

(继承自 XmlReader)
ReadElementContentAsFloat()

读取当前元素并将内容作为单精度浮点数返回。Reads the current element and returns the contents as single-precision floating-point number.

(继承自 XmlReader)
ReadElementContentAsFloat(String, String)

检查指定的本地名称和命名空间 URI 与当前元素的本地名称和命名空间 URI 是否匹配,然后读取当前元素,并将内容作为单精度浮点数返回。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.

(继承自 XmlReader)
ReadElementContentAsInt()

读取当前元素并将内容作为 32 位有符号整数返回。Reads the current element and returns the contents as a 32-bit signed integer.

(继承自 XmlReader)
ReadElementContentAsInt(String, String)

检查指定的本地名称和命名空间 URI 与当前元素的本地名称和命名空间 URI 是否匹配,然后读取当前元素,并将内容作为 32 位有符号整数返回。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.

(继承自 XmlReader)
ReadElementContentAsLong()

读取当前元素并将内容作为 64 位有符号整数返回。Reads the current element and returns the contents as a 64-bit signed integer.

(继承自 XmlReader)
ReadElementContentAsLong(String, String)

检查指定的本地名称和命名空间 URI 与当前元素的本地名称和命名空间 URI 是否匹配,然后读取当前元素,并将内容作为 64 位有符号整数返回。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.

(继承自 XmlReader)
ReadElementContentAsObject()

读取当前元素并将内容作为 Object 返回。Reads the current element and returns the contents as an Object.

(继承自 XmlReader)
ReadElementContentAsObject(String, String)

检查指定的本地名称和命名空间 URI 与当前元素的本地名称和命名空间 URI 是否匹配,然后读取当前元素,并将内容作为 Object 返回。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.

(继承自 XmlReader)
ReadElementContentAsObjectAsync()

异步读取当前元素并将内容作为 Object 返回。Asynchronously reads the current element and returns the contents as an Object.

(继承自 XmlReader)
ReadElementContentAsString()

读取当前元素并将内容作为 String 对象返回。Reads the current element and returns the contents as a String object.

(继承自 XmlReader)
ReadElementContentAsString(String, String)

检查指定的本地名称和命名空间 URI 与当前元素的本地名称和命名空间 URI 是否匹配,然后读取当前元素,并将内容作为 String 对象返回。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.

(继承自 XmlReader)
ReadElementContentAsStringAsync()

异步读取当前元素并将内容作为 String 对象返回。Asynchronously reads the current element and returns the contents as a String object.

(继承自 XmlReader)
ReadElementString()

读取纯文本元素。Reads a text-only element. 但是,建议改用 ReadElementContentAsString() 方法,因为该方法可以更直接地处理此操作。However, we recommend that you use the ReadElementContentAsString() method instead, because it provides a more straightforward way to handle this operation.

(继承自 XmlReader)
ReadElementString(String)

在读取纯文本元素之前,检查所找到元素的 Name 属性是否与给定的字符串匹配。Checks that the Name property of the element found matches the given string before reading a text-only element. 但是,建议改用 ReadElementContentAsString() 方法,因为该方法可以更直接地处理此操作。However, we recommend that you use the ReadElementContentAsString() method instead, because it provides a more straightforward way to handle this operation.

(继承自 XmlReader)
ReadElementString(String, String)

在读取纯文本元素之前,检查所找到元素的 LocalNameNamespaceURI 属性是否与给定的字符串匹配。Checks that the LocalName and NamespaceURI properties of the element found matches the given strings before reading a text-only element. 但是,建议改用 ReadElementContentAsString(String, String) 方法,因为该方法可以更直接地处理此操作。However, we recommend that you use the ReadElementContentAsString(String, String) method instead, because it provides a more straightforward way to handle this operation.

(继承自 XmlReader)
ReadEndElement()

检查当前内容节点是否为结束标记并将读取器推进到下一个节点。Checks that the current content node is an end tag and advances the reader to the next node.

(继承自 XmlReader)
ReadInnerXml()

当在派生类中被重写时,将所有内容(包括标记)当做字符串读取。When overridden in a derived class, reads all the content, including markup, as a string.

(继承自 XmlReader)
ReadInnerXmlAsync()

异步读取所有内容,包括作为字符串的标记。Asynchronously reads all the content, including markup, as a string.

(继承自 XmlReader)
ReadOuterXml()

当在派生类中被重写时,读取表示该节点和所有它的子级的内容(包括标记)。When overridden in a derived class, reads the content, including markup, representing this node and all its children.

(继承自 XmlReader)
ReadOuterXmlAsync()

异步读取包含该节点和所有它的子级的内容(包括标记)。Asynchronously reads the content, including markup, representing this node and all its children.

(继承自 XmlReader)
ReadStartElement()

检查当前节点是否为元素并将读取器推进到下一个节点。Checks that the current node is an element and advances the reader to the next node.

(继承自 XmlReader)
ReadStartElement(String)

检查当前内容节点是否为具有给定 Name 的元素并将读取器推进到下一个节点。Checks that the current content node is an element with the given Name and advances the reader to the next node.

(继承自 XmlReader)
ReadStartElement(String, String)

检查当前内容节点是否为具有给定 LocalNameNamespaceURI 的元素并将读取器推进到下一个节点。Checks that the current content node is an element with the given LocalName and NamespaceURI and advances the reader to the next node.

(继承自 XmlReader)
ReadString()

将元素或文本节点的内容读取为一个字符串。Reads the contents of an element or text node as a string.

ReadSubtree()

返回新的 XmlReader 实例,此实例可用于读取当前节点及其所有子节点。Returns a new XmlReader instance that can be used to read the current node, and all its descendants.

(继承自 XmlReader)
ReadToDescendant(String)

XmlReader 前进到下一个具有指定限定名的子代元素。Advances the XmlReader to the next descendant element with the specified qualified name.

(继承自 XmlReader)
ReadToDescendant(String, String)

XmlReader 前进到下一个具有指定的本地名称和命名空间 URI 的子代元素。Advances the XmlReader to the next descendant element with the specified local name and namespace URI.

(继承自 XmlReader)
ReadToFollowing(String)

一直读取,直到找到具有指定限定名的元素。Reads until an element with the specified qualified name is found.

(继承自 XmlReader)
ReadToFollowing(String, String)

一直读取,直到找到具有指定的本地名称和命名空间 URI 的元素。Reads until an element with the specified local name and namespace URI is found.

(继承自 XmlReader)
ReadToNextSibling(String)

XmlReader 前进到下一个具有指定限定名的同级元素。Advances the XmlReader to the next sibling element with the specified qualified name.

(继承自 XmlReader)
ReadToNextSibling(String, String)

XmlReader 推进到具有指定的本地名称和命名空间 URI 的下一个同级元素。Advances the XmlReader to the next sibling element with the specified local name and namespace URI.

(继承自 XmlReader)
ReadTypedValue()

获取指定 XML 架构定义语言 (XSD) 类型的公共语言运行时类型。Gets the common language runtime type for the specified XML Schema definition language (XSD) type.

ReadValueChunk(Char[], Int32, Int32)

读取嵌入在 XML 文档中的大量文本流。Reads large streams of text embedded in an XML document.

(继承自 XmlReader)
ReadValueChunkAsync(Char[], Int32, Int32)

异步读取嵌入在 XML 文档中的大量文本流。Asynchronously reads large streams of text embedded in an XML document.

(继承自 XmlReader)
ResolveEntity()

解析 EntityReference 节点的实体引用。Resolves the entity reference for EntityReference nodes.

Skip()

跳过当前节点的子级。Skips the children of the current node.

(继承自 XmlReader)
SkipAsync()

异步跳过当前节点的子级。Asynchronously skips the children of the current node.

(继承自 XmlReader)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

事件

ValidationEventHandler

设置事件处理程序以接收有关文档类型定义 (DTD)、XML 数据简化 (XDR) 架构和 XML 架构定义语言 (XSD) 架构验证错误的信息。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.Dispose()

有关此成员的说明,请参见 Dispose()For a description of this member, see Dispose().

(继承自 XmlReader)
IXmlLineInfo.HasLineInfo()

获取一个值,该值指示该类是否可返回行信息。Gets a value indicating whether the class can return line information.

IXmlNamespaceResolver.GetNamespacesInScope(XmlNamespaceScope)

有关此成员的说明,请参阅 GetNamespacesInScope(XmlNamespaceScope)For a description of this member, see GetNamespacesInScope(XmlNamespaceScope).

IXmlNamespaceResolver.LookupNamespace(String)

有关此成员的说明,请参阅 LookupNamespace(String)For a description of this member, see LookupNamespace(String).

IXmlNamespaceResolver.LookupPrefix(String)

有关此成员的说明,请参阅 LookupPrefix(String)For a description of this member, see LookupPrefix(String).

适用于

另请参阅