fs.readFile, defeats the purpose for a SaxParser. This is loading the entire xml into memory and causes errors when loading large xml files.
SaxParser.prototype.parseFile = function(filename) { //This function will only work in the node.js environment.
var fs = require('fs');
var that = this;
fs.readFile(filename, function (err, data) {
that.parseString(data);
});
}