Created
December 21, 2015 13:24
-
-
Save volkanozcan/5d8cb5412c4b92036262 to your computer and use it in GitHub Desktop.
js:nodejs_read_xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'), | |
xml2js = require('xml2js'); | |
var parser = new xml2js.Parser(); | |
fs.readFile(__dirname + '/buhara.xml', function(err, data) { | |
parser.parseString(data, function(err, result) { | |
//console.dir(result); | |
var buf = new Buffer(result) | |
console.log(buf) | |
console.log('Done'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment