Document.SelectNodes Method
Gets a Microsoft.Office.Interop.Word.XMLNodes collection that represents all the nodes that match the XPath parameter in the order in which they appear in the document.
Namespace: Microsoft.Office.Tools.Word
Assemblies: Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)
Syntax
'Declaration
Function SelectNodes ( _
XPath As String, _
PrefixMapping As String, _
FastSearchSkippingTextNodes As Boolean _
) As XMLNodes
XMLNodes SelectNodes(
string XPath,
string PrefixMapping,
bool FastSearchSkippingTextNodes
)
Parameters
XPath
Type: System.StringA valid XPath string. For more information on XPath, see XPath Reference.
PrefixMapping
Type: System.StringProvides 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
Type: System.Booleantrue skips all text nodes while searching for the specified node. false includes text nodes in the search. Default value is false.
Return Value
Type: Microsoft.Office.Interop.Word.XMLNodes
A Microsoft.Office.Interop.Word.XMLNodes collection that represents all the nodes that match the XPath parameter in the order in which they appear in the document; nulla null reference (Nothing in Visual Basic) 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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.