//60MB XML
For what reason would youwant to use node.js?
Who thought it would be a good idea to write extensions ("modules") in JS, when C is the norm?
What the fuck is wrong with the industry?!
I've talked to grown men advocating this shit, should get shot right on the spot desu
Web 1.0 death squads when
show the code m8
>>62387250
//php
$time = microtime(true);
$contents = file_get_contents(__DIR__ . '/test.xml');
$xml = simplexml_load_string($contents);
$array = json_decode(json_encode($xml), true);
//node
var time = new Date().getTime(),
xml2js = require('xml2js'),
parser = new xml2js.Parser(),
fs = require('fs');
fs.readFile(process.cwd() + '/test.xml', function (err, data) {
parser.parseString(data, function (error, xml) {
console.log(new Date().getTime() - time);
});
});