Microsoft Knowledge Base Email Alertz

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 dat

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 262545 - Last Review: October 15, 2002 - Revision: 1.3

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

This article was previously published under Q262545

On This Page

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 (http://msdn.microsoft.com/xml/default.asp) .

MORE INFORMATION

Steps to Reproduce Behavior

To reproduce this behavior, insert the following code into a new text document and save the document as repro.htm:
<HTML>
<BODY>
	<XML id=xmlid>
		<A>
		  <B xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="int">3</B>
		</A>
	</XML>
	<SCRIPT For=window Event=Onload>
		alert(xmlid.xml);
		xmlid.documentElement.childNodes(0).attributes.removeNamedItem("dt:dt");
		alert(xmlid.xml);
		xmlid.documentElement.childNodes(0).text = "foot";
	</SCRIPT>
</BODY>
</HTML>
				
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.

APPLIES TO
  • Microsoft XML Parser 2.0
Keywords: 
kbbug kbfix kbmsxml250fix KB262545
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate