7 Simple XML to JavaScript object converter. Uses [sax-js](http://github.com/isaacs/sax-js/).
9 See the tests for examples until docs are written.
11 Note: If you're looking for a full DOM parser, you probably want
12 [JSDom](http://github.com/tmpvar/jsdom).
17 Simplest way to install `xml2js` is to use [npm](http://npmjs.org), just `npm
18 install xml2js` which will download xml2js and all dependencies.
23 var sys = require('sys'),
25 xml2js = require('xml2js');
27 var parser = new xml2js.Parser();
28 parser.addListener('end', function(result) {
29 console.log(sys.inspect(result));
32 fs.readFile(__dirname + '/foo.xml', function(err, data) {
33 parser.parseString(data);
36 Running tests, development
37 --------------------------
39 The development requirements are handled by npm, you just need to install
40 them. We also have a number of unittests, they can be run using `zap`
41 directly from the project root.