This documentation is archived and is not being maintained.

XContainer.XPathEvaluate Method

Visual Studio 2008

Evaluates an XPath expression.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Public Extension Method XPathEvaluate(String) Evaluates an XPath expression. (Defined by Extensions.)
Public Extension Method XPathEvaluate(String, IXmlNamespaceResolver) Evaluates an XPath expression, resolving namespace prefixes using the specified IXmlNamespaceResolver. (Defined by Extensions.)

Although the ordering of returned collections is not specified in the XML XPath Language 1.0 Recommendation, this extension method returns nodes in document order.

Note that nodes are returned in document order even when you use a reverse axis, such as preceding-sibling or ancestor-or-self.