Article ID: 316656 - Last Review: February 19, 2007 - Revision: 5.3 BUG: Data Not Sorted When You Use Namespace Prefix in String Passed to XPathExpression.AddSortThis article was previously published under Q316656 This article refers to the following Microsoft .NET
Framework Class Library namespaces:
On This PageSYMPTOMS When you use a string to specify the sort key expression
parameter in a call to the AddSort method of the System.Xml.XPath.XPathExpression object, the XML data is not sorted. CAUSE This problem is only noticed when the specified sort key
expression contains XML element and attribute names that are prefixed with
namespaces. When a string is used to specify the sort key expression, the
namespace prefixes are not correctly resolved. This behavior is noticed even
when the System.Xml.XPath.XPathExpression object is associated with a System.Xml.XmlNamespaceManager object to which the namespace prefix definitions have been added.
RESOLUTION Use a second System.Xml.XPath.XPathExpression object to specify the sort key expression parameter when you
execute the AddSort method. STATUSMicrosoft
has confirmed that this is a problem in the Microsoft products that are listed
at the beginning of this article.
MORE INFORMATIONSteps to Reproduce the Behavior
| Article Translations
|
Back to the top
