_Document.SelectSingleNode(String, String, Boolean) 方法

定义

返回一个 XMLNode 对象,该对象代表指定文档中的节点。

public Microsoft.Office.Interop.Word.XMLNode SelectSingleNode (string XPath, string PrefixMapping = "", bool FastSearchSkippingTextNodes = false);
abstract member SelectSingleNode : string * string * bool -> Microsoft.Office.Interop.Word.XMLNode
Public Function SelectSingleNode (XPath As String, Optional PrefixMapping As String = "", Optional FastSearchSkippingTextNodes As Boolean = false) As XMLNode

参数

XPath
String

必需的 字符串 。 有效的 XPath 字符串。 有关 XPath 的详细信息,请参阅 Microsoft Developer Network (MSDN) 网站上的 XPath 参考文档。

PrefixMapping
String

可选 对象。 提供用于搜索的架构中的前缀。 PrefixMapping如果XPath参数使用名称搜索元素,请使用 参数。

FastSearchSkippingTextNodes
Boolean

可选属性,类型为 Boolean 所有文本节点都搜索时跳过指定的节点。 在搜索中包含文本节点。 默认值为 True

返回

注解

FastSearchSkippingTextNodes 参数设置为 False 会降低性能,因为 Microsoft Word针对节点中包含的文本搜索文档中的所有节点。

适用于