This documentation is archived and is not being maintained.
Extensions Class
Visual Studio 2010
This class contains the LINQ to XML extension methods that enable you to evaluate XPath expressions.
Assembly: System.Xml.Linq (in System.Xml.Linq.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | CreateNavigator(XNode) | Creates an XPathNavigator for an XNode. |
![]() ![]() | CreateNavigator(XNode, XmlNameTable) | Creates an XPathNavigator for an XNode. The XmlNameTable enables more efficient XPath expression processing. |
![]() ![]() | XPathEvaluate(XNode, String) | Evaluates an XPath expression. |
![]() ![]() | XPathEvaluate(XNode, String, IXmlNamespaceResolver) | Evaluates an XPath expression, resolving namespace prefixes using the specified IXmlNamespaceResolver. |
![]() ![]() | XPathSelectElement(XNode, String) | Selects an XElement using a XPath expression. |
![]() ![]() | XPathSelectElement(XNode, String, IXmlNamespaceResolver) | Selects an XElement using a XPath expression, resolving namespace prefixes using the specified IXmlNamespaceResolver. |
![]() ![]() | XPathSelectElements(XNode, String) | Selects a collection of elements using an XPath expression. |
![]() ![]() | XPathSelectElements(XNode, String, IXmlNamespaceResolver) | Selects a collection of elements using an XPath expression, resolving namespace prefixes using the specified IXmlNamespaceResolver. |
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.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show:
