Microsoft KB Archive/262545

= FIX: XML Element Retains Datatype After Datatype Attribute Is Programmatically Removed =

Article ID: 262545

Article Last Modified on 10/15/2002

-

APPLIES TO


 * Microsoft XML Parser 2.0

-



This article was previously published under Q262545



SYMPTOMS
The MSXML 2.0 parser retains the datatype of an element even after the datatype attribute (dt:dt) is programmatically removed through the Document Object Model (DOM). This causes validation to occur for the named datatype even after the datatype constraint has been removed.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This problem has been fixed in version 2.5 of the MSXML parser. To download the latest version of the parser, visit http://msdn.microsoft.com/xml/default.asp.



Steps to Reproduce Behavior
To reproduce this behavior, insert the following code into a new text document and save the document as repro.htm:     3    alert(xmlid.xml); xmlid.documentElement.childNodes(0).attributes.removeNamedItem(&quot;dt:dt&quot;); alert(xmlid.xml); xmlid.documentElement.childNodes(0).text = &quot;foot&quot;;    Browse to the page using an Internet Explorer Web browser on a computer with version 2.0 of the MSXML parser installed. The following error is generated:

Error: Error parsing 'foot' as int datatype.

Keywords: kbbug kbfix kbmsxml250fix KB262545

-

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

© Microsoft Corporation. All rights reserved.