Microsoft KB Archive/290083

= FIX: FOR XML EXPLICIT: Conflict Attribute in xmltext Is Not Overwritten if xmltext Contains DBCS =

Article ID: 290083

Article Last Modified on 11/6/2003

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q290083



BUG #: 236233 (SHILOH_BUGS)



SYMPTOMS
In an XML EXPLICIT mode, under certain conditions, with the xmltext element defined as double-byte character set (DBCS), a query may not overwrite the conflict attribute and may produce XML that is not well-formed.



RESOLUTION
To resolve this problem, obtain the latest service pack for SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack



STATUS
Microsoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.



MORE INFORMATION
In an XML EXPLICIT mode, under normal conditions, if an attribute that appears in the xmltext element conflicts with an attribute that is retrieved on the same element level, the attribute in xmltext is ignored and overwritten. Under certain conditions with DBCS, however, the conflict attribute is not overwritten, but is instead duplicated. This produces XML that is not well-formed.

To reproduce this behavior, create a table, insert a row, and query the table as follows: create table T1 (F0 int primary key, F1 TEXT collate Japanese_CI_AS) go insert into T1 values (111, ' ') go select 1 as TAG, 0 as parent, F1 as [elt1!1!!xmltext], F0 as [elt1!1!att0] from T1 for xml explicit The following is returned -- [INCORRECT RESULT] - att0 is not overwritten.

XML_F52E2B61-18A1-11d1-B105-00805F49916B 

when the expected result should be as follows: -- [EXPECTED RESULT] - att0=&quot;222&quot; is overwritten with att0=&quot;111&quot;

XML_F52E2B61-18A1-11d1-B105-00805F49916B 

Keywords: kbbug kbfix kbsqlserv2000sp1fix KB290083

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.