jindw / xmldom

A PURE JS W3C Standard based(XML DOM Level2 CORE) DOMParser and XMLSerializer.
Other
816 stars 265 forks source link

Namespace duplication in serialization #191

Closed zorkow closed 7 years ago

zorkow commented 7 years ago

Namespaces are output twice, once as a regular attribute, once as a single quoted "attribute", in string serialization. Error occurred when moving to from package 0.1.22 to 0.1.24.

Minimal example:

  xmldom = require('xmldom');
  var dp = new xmldom.DOMParser();
  var doc = dp.parseFromString('<math xmlns="http://www.w3.org/1998/Math/MathML"><mn>1</mn></math>', 'text/xml');
  doc.toString();

yields

 <math xmlns="http://www.w3.org/1998/Math/MathML" xmlns=\'http://www.w3.org/1998/Math/MathML\'><mn>1</mn></math>

All other behaviour involving namespaces seems to be unaffected.

jindw commented 7 years ago

sorry testcase added!! I'll fix that right now.

jindw commented 7 years ago

fixed!! v0.1.27

zorkow commented 7 years ago

Great. Thanks for the quick turnaround. Works fine for v0.1.25/26/27.

On 28 November 2016 at 03:35, jindw notifications@github.com wrote:

fixed!! v0.1.25

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jindw/xmldom/issues/191#issuecomment-263176439, or mute the thread https://github.com/notifications/unsubscribe-auth/AFc836zCPd2eTMG1ZvFbh7-X07SGuySDks5rCkwVgaJpZM4K9Rms .