Leonidas-from-XIV / node-xml2js

XML to JavaScript object converter.
MIT License
4.88k stars 604 forks source link

xmlbuilder inconsistently encodes entities #644

Open Craigfis opened 2 years ago

Craigfis commented 2 years ago

This code: const xml = xmlbuilder.create('root').element('node', { 'attr': 'a < enclosed > b'}); console.log(xml.end()); Produces: <?xml version="1.0"?><root><node attr="a &lt; enclosed > b"/></root>

Why is it writing out the < as an entity but not the >. This is breaking round trip parsing xml -> build xml for me.