Quantcast
Channel: Converting to xml to json - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Converting to xml to json

$
0
0

I am using the xml2json module to convert a XML payload into JSON, but the i am seeing the following

If i have the following

var xml = <Stat />;var obj = xml2json.toJson(xml, {});

The obj["Stat"] is being picked up as empty {} rather than a empty "".

EDITLets say we have a nested xml structure

<?xml version="1.0" encoding="UTF-8"?><ABC><RECORD><STAT /></RECORD></ABC>

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images