The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
Extensions::XPathSelectElement Method (XNode^, String^)
.NET Framework (current version)
Selects an XElement using a XPath expression.
Assembly: System.Xml.Linq (in System.Xml.Linq.dll)
public: [ExtensionAttribute] static XElement^ XPathSelectElement( XNode^ node, String^ expression )
Parameters
- node
-
Type:
System.Xml.Linq::XNode^
The XNode on which to evaluate the XPath expression.
- expression
-
Type:
System::String^
A String that contains an XPath expression.
The following example creates a small XML tree and uses XPathSelectElement to select a single element.
This example produces the following output:
<Child4>4</Child4>
.NET Framework
Available since 3.5
Silverlight
Available since 4.0
Available since 3.5
Silverlight
Available since 4.0
Show: