make mml2json node-v6 compatible

This commit is contained in:
Dane Springmeyer 2012-04-16 15:32:08 -07:00
parent 2e750634bf
commit 535cbb881a

View File

@ -1,15 +1,14 @@
#!/usr/bin/env node
var xml2js = require('xml2js'),
fs = require('fs'),
sys = require('sys');
fs = require('fs');
if (!process.ARGV[2]) {
if (!process.argv[2]) {
console.log('Please specify a XML file.');
process.exit(1);
}
fs.readFile(process.ARGV[2], 'utf-8', function(err, data) {
fs.readFile(process.argv[2], 'utf-8', function(err, data) {
if (err) throw err;
// Replace entities.