Skip to content

json to xml: Auto convert < to &lt #209

@anhuet

Description

@anhuet

I'm using json2xml

var convert = require('xml-js');
var json = require('fs').readFileSync('test.json', 'utf8');
var options = {compact: true, ignoreComment: true, spaces: 4};
var result = convert.json2xml(json, options);
console.log(result);

Here is test.json file

{
    "value": [
        {
            "_text": "\"test < \""
        }
    ]
}

Result:
<value>"test &lt; "</value>

Expect:
<value>"test < "</value>

Is there any way to ignore auto convert < to &lt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions