RunKit + npm: xml2js

var parseString = require('xml2js').parseString; var xml = '<example><description>Nice example</description><values><value name="first">12</value><value name="second">42</value></values></example>' parseString(xml, function (err, result) { console.log(JSON.stringify(result)); });
Created from: https://runkit.com/npm/xml2js
Loading…

no comments

    sign in to comment