Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 263587 - Last Review: September 30, 2003 - Revision: 2.3
FIX: XML DOM Node of Type Boolean Persists Incorrectly
This article was previously published under Q263587
On This Page
SYMPTOMS
If an XML Document Object Model (DOM) node is of type
Boolean and the type is set to
True by using the DOM
NodeTypedValue property, the value for the node is incorrectly persisted as -1 on a computer using version 2.0 of the MSXML parser, when it should actually be persisted as 1.
RESOLUTION
The MSXML parser, version 2.5 (5.0.2920.0), corrects this problem.
STATUS
This problem was corrected in 2.5 (5.0.2920.0) or later.
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 problem, insert the following code into a new text document, and save the document as
repro.htm:
<html>
<xml id="xml1">
<doc xmlns:dt='urn:schemas-microsoft-com:datatypes'>
<x dt:dt="boolean">1</x>
</doc>
</xml>
<script>
var root = xml1.XMLDocument.documentElement;
alert(root.xml);
root.childNodes(0).nodeTypedValue = true;
alert(root.childNodes(0).text);
</script>
</html>
On a computer with version 2.0 of the MSXML parser installed, note that the second message box produces a value of -1 rather than 1, as expected.
APPLIES TO
- Microsoft XML Parser 2.0
- Microsoft XML Parser 3.0
- Microsoft XML Core Services 4.0
| kbbug kbfix kbmsxml250fix KB263587 |
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
Be the first to leave feedback, to help others about this knowledge base
article.
(Optional) Name
(Optional)
Public URL Or Email
Comments
No
HTML -- Text Only Please