Click to return to the XML (Extensible Markup Language) home page    
IXMLDOMNode::selectNodes ...     IXMLDOMNode::specified Pr...     IXMLDOMNode Interface    
Web Workshop  |  XML (Extensible Markup Language)

IXMLDOMNode::selectSingleNode Method


Applies the specified pattern to this node's context and returns the first matching node.

Visual Basic Syntax

Set objXMLDOMNode = oXMLDOMNode.selectSingleNode(patternString)

C/C++ Syntax

HRESULT selectSingleNode(
    BSTR patternString,
    IXMLDOMNode **resultNode);

Parameters

patternString
[in] XSL Pattern that is to be used in the query; applied to this node's context.
resultNode
[out] First node that is selected by the XSL Pattern query. If no nodes result from the query, it returns NULL.

C/C++ Return Values

S_OK
Value returned if successful.
S_FALSE
Value when returning null. 
E_INVALIDARG
Value returned if resultNode is null.

Remarks

For an overview of XSL, see Using the XSL Processor. For a complete description of XSL patterns, 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.



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.