Ticket #9 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

xml.node2XML fails with a null document node

Reported by: jp@fiset.ca Assigned to: Jan-Klaas Kollhof
Priority: normal Milestone:
Component: jsolait-core Version: 2.0
Severity: normal Keywords:
Cc:

Description

While serializing a node, the node2XML function does not detect a null document node.

Attachments

patch_jsolait_xml.txt (0.7 kB) - added by jp@fiset.ca on 01/20/06 14:07:51.
patch

Change History

01/20/06 14:06:17 changed by jp@fiset.ca

Here is a patch for it:

Index: C:/eclipse/sentinel/www/jsolait/lib/xml.js =================================================================== --- C:/eclipse/sentinel/www/jsolait/lib/xml.js (revision 35) +++ C:/eclipse/sentinel/www/jsolait/lib/xml.js (working copy) @@ -249,7 +249,9 @@

s+=nsprefix + node.localName+'="' + node.value + '"'; break;

case DOCUMENT_NODE:

- s+=this.node2XML(node.documentElement, nsPrefixMap); + if( null != node.documentElement ) { + s+=this.node2XML(node.documentElement, nsPrefixMap); + }

break;

case ELEMENT_NODE:

s+="<" + node.tagName;

01/20/06 14:07:51 changed by jp@fiset.ca

  • attachment patch_jsolait_xml.txt added.

patch

01/20/06 14:23:43 changed by Jan-Klaas Kollhof

  • status changed from new to assigned.

01/20/06 14:25:55 changed by Jan-Klaas Kollhof

  • status changed from assigned to closed.
  • resolution set to fixed.