Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

Represents the list of nodes that match a given XSL Pattern or XML Path Language (XPath) expression.

Methods

The following table shows the methods for IXMLDOMSelection.

Method Description

clone

Produces an exact copy of the current XMLDOMSelectionobject.

getProperty

Looks up a property by name.

item

Allows random access to individual nodes within a collection. This method has no effect on the current position.

matches

Checks whether the passed-in node is contained in the current collection.

nextNode

Returns the next node in a collection.

peekNode

Gets the next node that nextNodewill return without advancing the line position.

removeAll

Removes all the nodes from the current context that match the query.

removeNext

Removes the next node that would be returned by peekNodeor nextNode.

reset

Resets the position of the list to its initial state.

Properties

The following table shows the properties for IXMLDOMSelection.

Property Description

context

Specifies the node (subtree) to apply a selection.

expr

Gets or sets the XML Path Language (XPath) expression string.

length

Indicates the number of items in a collection.

Events

None

Remarks

IXMLDOMSelectionis created through the selectNodesmethod on IXMLDOMDocument2. IXMLDOMSelectionis an extension of the World Wide Web Consortium (W3C) Document Object Model (DOM).

This interface inherits all of the methods, properties, and events of IXMLDOMNodeList.

Setting Version-independent Version-dependent

ProgID

Msxml2.DOMDocument, Msxml2.FreeThreadedDOMDocument

Msxml2.DOMDocument.3.0, Msxml2.FreeThreadedDOMDocument.3.0

CLSID

F6D90F11-9C73-11D3-B32E-00C04F990BB4

f5078f32-c551-11d3-89b9-0000f81fe221

See Also