Επεξεργασία

Κοινή χρήση μέσω


Extensions Class

Definition

This class contains the LINQ to XML extension methods that enable you to evaluate XPath expressions.

public ref class Extensions abstract sealed
public static class Extensions
type Extensions = class
Public Module Extensions
Inheritance
Extensions

Remarks

There is some performance penalty for using these methods. Using LINQ to XML queries yields better performance.

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.

Methods

CreateNavigator(XNode, XmlNameTable)

Creates an XPathNavigator for an XNode. The XmlNameTable enables more efficient XPath expression processing.

CreateNavigator(XNode)

Creates an XPathNavigator for an XNode.

XPathEvaluate(XNode, String, IXmlNamespaceResolver)

Evaluates an XPath expression, resolving namespace prefixes using the specified IXmlNamespaceResolver.

XPathEvaluate(XNode, String)

Evaluates an XPath expression.

XPathSelectElement(XNode, String, IXmlNamespaceResolver)

Selects an XElement using a XPath expression, resolving namespace prefixes using the specified IXmlNamespaceResolver.

XPathSelectElement(XNode, String)

Selects an XElement using a XPath expression.

XPathSelectElements(XNode, String, IXmlNamespaceResolver)

Selects a collection of elements using an XPath expression, resolving namespace prefixes using the specified IXmlNamespaceResolver.

XPathSelectElements(XNode, String)

Selects a collection of elements using an XPath expression.

Applies to