_Document.SelectNodes Method 

Returns an XMLNodes collection that represents all the specified nodes in the order in which they appear in the document.

Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in microsoft.office.interop.word.dll)

Usage

Dim XPath As String
Dim PrefixMapping As String
Dim FastSearchSkippingTextNodes As Boolean
Dim returnValue As XMLNodes
Dim _Document1 As _Document
returnValue = _Document1.SelectNodes(XPath, PrefixMapping, FastSearchSkippingTextNodes)

Syntax

Function SelectNodes( _
    <InAttribute()> ByVal XPath As String, _
    <InAttribute()> Optional ByVal PrefixMapping As String, _
    <InAttribute()> Optional ByVal FastSearchSkippingTextNodes As Boolean _
) As XMLNodes
XMLNodes SelectNodes(
    [In] string XPath, 
    [In, Optional] string PrefixMapping, 
    [In, Optional] bool FastSearchSkippingTextNodes
);
public: XMLNodes^ SelectNodes(
    String^ XPath, 
    String^ PrefixMapping, 
    Boolean FastSearchSkippingTextNodes
);
public XMLNodes SelectNodes(
    /*in*/System.String XPath, 
    /*in*/System.String PrefixMapping, 
    /*in*/boolean FastSearchSkippingTextNodes
);
function SelectNodes(
     XPath : String, 
     PrefixMapping : String, 
     FastSearchSkippingTextNodes : Boolean
) : XMLNodes;

Parameters

  • XPath
    Required String. A valid XPath string. For more information on XPath, see the XPath reference documentation on the Microsoft Developer Network (MSDN) Web site.
  • PrefixMapping
    Optional Object. 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
    Optional Boolean. True skips all text nodes while searching for the specified node. False includes text nodes in the search. Default value is False.

Remarks

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

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

See Also

Reference

_Document Interface
Microsoft.Office.Interop.Word Namespace

Other Resources

_Document Members