var fs = require('fs'),
    util = require('util'),
    xml2js = require('xml2js');

var parser = new xml2js.Parser();
fs.readFile(__dirname + '/foo.xml', function(err, data) {
    parser.parseString(data, function (err, result) {
        console.log(util.inspect(result,false,null,true));
        console.log('Done');
    });
});