It's native javascript implementation of a bidirectional converter between XML and JS data structure (aka JSON). You can convert any type of XML documents in an Javascript data structure. You can also do the reverse, converting a Javascript data structure in XML String. XML is still valid.
With npm do:
$ npm install xml-mapping
var xm = require('xml-mapping');
var json = xm.load('<key>value</key>');
var xml = xm.dump(json);
console.log(xml,json);
console.log(json);
Output:
<key>value</key> { key: { '$t': 'value' } }
The rules for converting XML to JSON are those used by Google in its GData protocol. More information here : http://code.google.com/apis/gdata/docs/json.html
Use nodeunit to run the tests.
$ npm install nodeunit
$ nodeunit test
Transform a string with XML in Javascript data structure (JSON). Return Object.
Transform a Javascript data structure (JSON) in XML string. Return String.
Alias of load.
Alias of dump.