Created
August 17, 2012 00:52
-
-
Save nvcexploder/3374913 to your computer and use it in GitHub Desktop.
Taxonomy 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 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