System.Xml.Linq
4.0.0.0
System.Object
There is some performance penalty for using these methods. Using sqltecxlinq 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.
This class contains the sqltecxlinq extension methods that enable you to evaluate XPath expressions.
Method
4.0.0.0
System.Xml.XPath.XPathNavigator
You cannot edit the XML tree by using the that is returned by this method. The property returns false.
You cannot create an for a node. Document types do not participate in the XPath data model.
Namespace declarations are reported from left to right. In contrast, for namespaces are reported from right to left. This is conformant behavior because namespace declarations are not ordered in the XPath data model.
The method is not supported for navigators that are returned by this method.
You can use this method to perform an XSLT transformation. You can create an XML tree, create an from the XML tree, create a new document, and create a that will write into the new document. Then, you can invoke the XSLT transformation, passing the and to the transform. After the transformation successfully completes, the new XML tree is populated with the results of the transformation.
To perform an XSLT transformation, you can use either an or an . The two approaches have different performance characteristics. Some transformations will execute faster when using an , and others will execute faster when using a . If performance is a concern, we recommend that you experiment with each approach to determine which will perform better in your circumstances.
Creates an for an .
An that can process XPath queries.
An that can process XPath queries.
Method
4.0.0.0
System.Xml.XPath.XPathNavigator
You cannot edit the XML tree using the that is returned by this method. The property returns false.
You cannot create an for a node. Document types do not participate in the XPath data model.
Namespace declarations are reported from left to right. In contrast, for namespaces are reported from right to left. This is conformant behavior because namespace declarations are not ordered in the XPath data model.
The method is not supported for navigators that are returned by this method.
If you use an with this method to create the , you will get better performance when evaluating XPath expressions.
Creates an for an . The enables more efficient XPath expression processing.
An that can process XPath queries.
An that can process an XPath query.
A to be used by .
Method
4.0.0.0
System.Object
If the collection is an enumeration of elements or attributes, you can use the Cast operator to get a collection of or .
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.
Evaluates an XPath expression.
An object that can contain a bool, a double, a string, or an .
The on which to evaluate the XPath expression.
A that contains an XPath expression.
Method
4.0.0.0
System.Object
You can use this method to evaluate XPath expressions that contain namespace prefixes.
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.
Evaluates an XPath expression, resolving namespace prefixes using the specified .
An object that contains the result of evaluating the expression. The object can be a bool, a double, a string, or an .
The on which to evaluate the XPath expression.
A that contains an XPath expression.
A for the namespace prefixes in the XPath expression.
Method
4.0.0.0
System.Xml.Linq.XElement
To be added.
Selects an using a XPath expression.
An , or null.
The on which to evaluate the XPath expression.
A that contains an XPath expression.
Method
4.0.0.0
System.Xml.Linq.XElement
You can use this method to evaluate XPath expressions that contain namespace prefixes.
Selects an using a XPath expression, resolving namespace prefixes using the specified .
An , or null.
The on which to evaluate the XPath expression.
A that contains an XPath expression.
An for the namespace prefixes in the XPath expression.
Method
4.0.0.0
System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement>
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.
Selects a collection of elements using an XPath expression.
An of that contains the selected elements.
The on which to evaluate the XPath expression.
A that contains an XPath expression.
Method
4.0.0.0
System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement>
You can use this method to evaluate XPath expressions that contain namespace prefixes.
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.
Selects a collection of elements using an XPath expression, resolving namespace prefixes using the specified .
An of that contains the selected elements.
The on which to evaluate the XPath expression.
A that contains an XPath expression.
A for the namespace prefixes in the XPath expression.