SelectAncestors Method (XPathNodeType, Boolean)

XPathNavigator.SelectAncestors Method (XPathNodeType, Boolean)

Selects all the ancestor nodes of the current node that have a matching XPathNodeType.

Namespace:  System.Xml.XPath
Assembly:  System.Xml.XPath (in System.Xml.XPath.dll)

public virtual XPathNodeIterator SelectAncestors(
	XPathNodeType type,
	bool matchSelf
)

Parameters

type
Type: System.Xml.XPath.XPathNodeType
The XPathNodeType of the ancestor nodes.
matchSelf
Type: System.Boolean
To include the context node in the selection, true; otherwise, false.

Return Value

Type: System.Xml.XPath.XPathNodeIterator
An XPathNodeIterator that contains the selected nodes. The returned nodes are in reverse document order.

Silverlight

Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2016 Microsoft