Skip to content

Instantly share code, notes, and snippets.

@nvcexploder
Created August 17, 2012 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nvcexploder/3374913 to your computer and use it in GitHub Desktop.
Save nvcexploder/3374913 to your computer and use it in GitHub Desktop.
Taxonomy XML
var Xml = require('./lib/xml');
var Fs = require('fs');
var config = {
// enforceSingle:['name',
// 'url',
// 'level',
// 'id',
// 'parent',
// 'rank',
// 'category',
// 'children'],
// postFunc: function(result){
// console.log(JSON.stringify(result));
// }
}
var parser = Xml.createParser(config);
parser.on('final', function (result) {
console.log('Yar!');
});
Fs.readFile('./Taxonomy.xml', function(err, data){
parser.parse(data);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment