Skip to content

XML Prolog inconsistence #33

@laubstein

Description

@laubstein

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions