FIX: XML DOM Node of Type Boolean Persists Incorrectly (263587)



The information in this article applies to:

  • Microsoft XML 2.0
  • Microsoft XML 3.0
  • Microsoft XML 4.0

This article was previously published under Q263587

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.

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.

Modification Type:MajorLast Reviewed:9/30/2003
Keywords:kbBug kbfix kbMSXML250fix KB263587