Inital Commit
[oweals/finalsclub.git] / node_modules / aws-lib / node_modules / xml2js / README.md
1 node-xml2js
2 ===========
3
4 Description
5 -----------
6
7 Simple XML to JavaScript object converter. Uses [sax-js](http://github.com/isaacs/sax-js/).
8
9 See the tests for examples until docs are written.
10
11 Note: If you're looking for a full DOM parser, you probably want
12 [JSDom](http://github.com/tmpvar/jsdom).
13
14 Installation
15 ------------
16
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.
19
20 Simple usage
21 -----------
22
23     var sys = require('sys'),
24         fs = require('fs'),
25         xml2js = require('xml2js');
26
27     var parser = new xml2js.Parser();
28     parser.addListener('end', function(result) {
29         console.log(sys.inspect(result));
30         console.log('Done.');
31     });
32     fs.readFile(__dirname + '/foo.xml', function(err, data) {
33         parser.parseString(data);
34     });
35
36 Running tests, development
37 --------------------------
38
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.