selectNodes Method (Windows CE 5.0)
Applies the specified pattern-matching operation to this node's context and returns the list of matching nodes as IXMLDOMNodeList.
[Script]
Script Syntax
varobjXMLDOMNodeList=oXMLDOMNode.selectNodes(expression);
Script Parameters
- expression
String specifying the XSLPattern or XPath query that is to be applied to the context defined by this node. The value of the SelectionLanguage internal property (flag) determines whether an XSLPattern or XPath query is used. By default, the expression is an XSLPattern query. The SelectionLanguage internal property (flag) can be set with the setProperty method.
Script Return Value
Object. Returns a collection of nodes selected by an XSL Pattern or XPath query. If no nodes are selected, an empty collection is returned.
[C/C++]
C/C++ Syntax
HRESULT selectNodes(BSTRexpression,IXMLDOMNodeList** resultList);
C/C++ Parameters
- expression
[in] The value of the SelectionLanguage internal property (flag) determines whether an XSL Pattern or XPath query is used. By default, the expression is an XSL pattern query. The SelectionLanguage internal property (flag) can be set with the setProperty method. - resultList
[out, retval] List of nodes selected by the XSL Pattern or XPath 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.
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: Msxml2.h, Msxml2.idl.
Link Library: Uuid.lib.
General Remarks
This method is only valid if the XML Query Language (XQL) feature has been included in the operating system (OS). If a call to this method is made and XQL is not supported, an error message will be returned.
The selectSingleNode method is similar to the selectNodes method, but returns only the first matching node rather than the list of all matching nodes.
IXMLDOMNodeList is live and immediately reflects changes to the nodes that appear in the list.
This member is an extension of the World Wide Web Consortium (W3C) Document Object Model (DOM).
This method applies to the following objects and interfaces:
IXMLDOMNodeList, IXMLDOMAttribute, IXMLDOMCDATASection, IXMLDOMCharacterData, IXMLDOMComment, DOMDocument, IXMLDOMDocumentFragment, IXMLDOMDocumentType, IXMLDOMElement, IXMLDOMEntity, IXMLDOMEntityReference, IXMLDOMNode, IXMLDOMNotation, IXMLDOMProcessingInstruction, IXMLDOMText, and IXTLRuntime.
See Also
setProperty Method | selectSingleNode Method
Send Feedback on this topic to the authors