Last active
August 29, 2018 15:11
-
-
Save slayerlab/4b6ec7bbec432bd0bf6cfeba5ccd2ec3 to your computer and use it in GitHub Desktop.
só pra mim não esquecer
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
const xmlStream = require('xml-stream') | |
, fs = require('fs') | |
var stream = fs.createReadStream(__dirname+'./filename.xml') | |
, xml = new xmlStream(stream) | |
xml.preserve('some_subnode', true) | |
xml.collect('subtime_from_some_subnode') | |
xml.on('endElement: item', function (node) { | |
console.log(node) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I hate that appearance, albeit this code-style is useful so plenty at
diff
'ing moments.