Microsoft XML 2.5 SDK


 

IXMLDOMNode::selectNodes Method

[This is preliminary documentation and subject to change.]

Applies the specified pattern-matching operation to this node's context and returns the list of matching nodes.

Visual Basic Syntax

Set objXMLDOMNodeList = oXMLDOMNode.selectNodes(patternString)

C/C++ Syntax

HRESULT selectNodes(

    BSTR patternString,

    IXMLDOMNodeList **resultList);

Parameters

patternString

[in]
XSL Pattern that is to be used in the query; applied to this node's context.

resultList

[out]
List of nodes selected by the XSL Pattern query. If no nodes are selected by the query, an empty node list is returned.

C/C++ Return Values

S_OK

Value returned if successful.

E_INVALIDARG

Value returned if resultList is null.

Remarks

For an overview of XSL, see Using the XSL Processor. For a complete description of the pattern syntax, see the XSL Pattern Syntax reference.

The selectSingleNode method is much like the selectNodes method, but returns only the first matching node rather than the list of all matching nodes.

The IXMLDOMNodeList is live and immediately reflects changes to the nodes that appear in the list.