AddSort()

XPathExpression::AddSort(SharedPtr<Object>, SharedPtr<Collections::Generic::IComparer<SharedPtr<Object>>>) method

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

virtual void System::Xml::XPath::XPathExpression::AddSort(SharedPtr<Object> expr, SharedPtr<Collections::Generic::IComparer<SharedPtr<Object>>> comparer)=0

Arguments

ParameterTypeDescription
exprSharedPtr<Object>An object representing the sort key. This can be the string value of the node or an XPathExpression object with a compiled XPath expression.
comparerSharedPtr<Collections::Generic::IComparer<SharedPtr<Object>>>An IComparer object that provides the specific data type comparisons for comparing two objects for equivalence.

XPathExpression::AddSort(SharedPtr<Object>, XmlSortOrder, XmlCaseOrder, String, XmlDataType) method

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

virtual void System::Xml::XPath::XPathExpression::AddSort(SharedPtr<Object> expr, XmlSortOrder order, XmlCaseOrder caseOrder, String lang, XmlDataType dataType)=0

Arguments

ParameterTypeDescription
exprSharedPtr<Object>An object representing the sort key. This can be the string value of the node or an XPathExpression object with a compiled XPath expression.
orderXmlSortOrderAn XmlSortOrder value indicating the sort order.
caseOrderXmlCaseOrderAn XmlCaseOrder value indicating how to sort uppercase and lowercase letters.
langStringThe language to use for comparison. Uses the Globalization::CultureInfo class that can be passed to the String::Compare method for the language types, for example, "us-en" for U.S. English. If an empty string is specified, the system environment is used to determine the Globalization::CultureInfo.
dataTypeXmlDataTypeAn XmlDataType value indicating the sort order for the data type.

See Also