Share via


Document.SelectNodes(String, String, Boolean) Method

Definition

Gets a XMLNodes collection that represents all the nodes that match the XPath parameter in the order in which they appear in the document.

public Microsoft.Office.Interop.Word.XMLNodes SelectNodes (string XPath, string PrefixMapping = "", bool FastSearchSkippingTextNodes = true);
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 = true) As XMLNodes

Parameters

XPath
String

A valid XPath string. For more information on XPath, see XPath Reference.

PrefixMapping
String

Provides the prefix in the schema against which to perform the search. Use the PrefixMapping parameter if your XPath parameter uses names to search for elements.

FastSearchSkippingTextNodes
Boolean

true skips all text nodes while searching for the specified node. false includes text nodes in the search. Default value is false.

Returns

A XMLNodes collection that represents all the nodes that match the XPath parameter in the order in which they appear in the document; null if no nodes matching the XPath parameter are found.

Remarks

Setting the FastSearchSkippingTextNodes parameter to true diminishes performance, because Microsoft Office Word searches all nodes in a document against the text contained in the node.

Optional Parameters

For information on optional parameters, see Optional Parameters in Office Solutions.

Applies to