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

定义

返回一个 XMLNodes 集合,该集合代表所有指定节点在文档中的出现顺序。

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

参数

XPath
String

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

PrefixMapping
String

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

FastSearchSkippingTextNodes
Boolean

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

返回

注解

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

适用于