XPathDocument 类

定义

使用 XPath 数据模型提供 XML 文档的快速、只读、内存表示形式。Provides a fast, read-only, in-memory representation of an XML document by using the XPath data model.

public ref class XPathDocument : System::Xml::XPath::IXPathNavigable
public class XPathDocument : System.Xml.XPath.IXPathNavigable
type XPathDocument = class
    interface IXPathNavigable
Public Class XPathDocument
Implements IXPathNavigable
继承
XPathDocument
实现

注解

有关使用 XPath 数据模型处理 XML 数据的详细信息,请参阅 使用 Xpath 数据模型处理 Xml 数据 主题。For more information about processing XML data by using the XPath data model, see the Process XML Data Using the XPath Data Model topic.

构造函数

XPathDocument(Stream)

使用指定的 XPathDocument 对象中的 XML 数据对 Stream 类的新实例进行初始化。Initializes a new instance of the XPathDocument class from the XML data in the specified Stream object.

XPathDocument(String)

使用指定文件中的 XML 数据对 XPathDocument 类的新实例进行初始化。Initializes a new instance of the XPathDocument class from the XML data in the specified file.

XPathDocument(String, XmlSpace)

使用指定文件中的 XML 数据对 XPathDocument 类的新实例进行实例化,并采用指定的空白处理方法。Initializes a new instance of the XPathDocument class from the XML data in the file specified with the white space handling specified.

XPathDocument(TextReader)

使用指定的 XPathDocument 对象中包含的 XML 数据对 TextReader 类的新实例进行初始化。Initializes a new instance of the XPathDocument class from the XML data that is contained in the specified TextReader object.

XPathDocument(XmlReader)

使用指定的 XPathDocument 对象中包含的 XML 数据对 XmlReader 类的新实例进行初始化。Initializes a new instance of the XPathDocument class from the XML data that is contained in the specified XmlReader object.

XPathDocument(XmlReader, XmlSpace)

使用指定的 XPathDocument 对象中包含的 XML 数据对 XmlReader 类的新实例进行初始化,并采用指定的空白处理方法。Initializes a new instance of the XPathDocument class from the XML data that is contained in the specified XmlReader object with the specified white space handling.

方法

CreateNavigator()

初始化一个只读 XPathNavigator 对象,用于在此 XPathDocument 的节点中进行导航。Initializes a read-only XPathNavigator object for navigating through nodes in this XPathDocument.

Equals(Object)

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

(继承自 Object)
GetHashCode()

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

(继承自 Object)
GetType()

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

(继承自 Object)
MemberwiseClone()

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

(继承自 Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅