<PackageReference Include="System.Xml.XPath" Version="4.0.1-beta-23409" />

XPathExpression

public abstract class XPathExpression
Provides a typed class that represents a compiled XPath expression.
public abstract string Expression { get; }

When overridden in a derived class, gets a string representation of the XPathExpression.

public abstract XPathResultType ReturnType { get; }

When overridden in a derived class, gets the result type of the XPath expression.

public static XPathExpression Compile(string xpath)

Compiles the XPath expression specified and returns an XPathExpression object representing the XPath expression.

public static XPathExpression Compile(string xpath, IXmlNamespaceResolver nsResolver)

Compiles the specified XPath expression, with the IXmlNamespaceResolver object specified for namespace resolution, and returns an XPathExpression object that represents the XPath expression.

public abstract void AddSort(object expr, IComparer comparer)

When overridden in a derived class, sorts the nodes selected by the XPath expression according to the specified IComparer object.

public abstract void AddSort(object expr, XmlSortOrder order, XmlCaseOrder caseOrder, string lang, XmlDataType dataType)

When overridden in a derived class, sorts the nodes selected by the XPath expression according to the supplied parameters.

public abstract XPathExpression Clone()

When overridden in a derived class, returns a clone of this XPathExpression.

public abstract void SetContext(XmlNamespaceManager nsManager)

When overridden in a derived class, specifies the XmlNamespaceManager object to use for namespace resolution.

public abstract void SetContext(IXmlNamespaceResolver nsResolver)

When overridden in a derived class, specifies the IXmlNamespaceResolver object to use for namespace resolution.