Given:
var strXml = '<?xml version="1.0" encoding="UTF-8"?><a>1</a>';
var xml = JXON.stringToXml(strXml);
var json = JXON.xmlToJs(xml);
console.log('XML to String', JXON.xmlToString(xml));
console.log('JS to String', JXON.jsToString(json));
Using Chrome 52:
XML to String <?xml version="1.0" encoding="UTF-8"?><a>1</a>
JS to String <a>1</a>
Using Firefox 48:
XML to String <?xml version="1.0" encoding="UTF-8"?><a>1</a>
JS to String <a>1</a>
Using node (npm run test-node):
XML to String <?xml version="1.0" encoding="UTF-8"?><a>1</a>
JS to String <a>1</a>
Using Browserify (npm run test-webkit):
XML to String <a>1</a>
JS to String <a>1</a>
As JXON is a 'lossless', the xml prolog need to be consistent in all serializations.
Expected result:
XML to String <?xml version="1.0" encoding="UTF-8"?><a>1</a>
JS to String <?xml version="1.0" encoding="UTF-8"?><a>1</a>
Given:
Using Chrome 52:
Using Firefox 48:
Using node (npm run test-node):
Using Browserify (npm run test-webkit):
As JXON is a 'lossless', the xml prolog need to be consistent in all serializations.
Expected result: