Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

XNode.XPathSelectElements Method

.NET Framework 3.5

Selects a collection of elements using 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.

  NameDescription
Public Extension Method XPathSelectElements(String) Selects a collection of elements using an XPath expression. (Defined by Extensions.)
Public Extension Method XPathSelectElements(String, IXmlNamespaceResolver) Selects a collection of elements using an XPath expression, resolving namespace prefixes using the specified IXmlNamespaceResolver. (Defined by Extensions.)
Top

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.

Community Additions

ADD
Show:
© 2015 Microsoft