Skip to content

XML Prolog inconsistence #33

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>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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