var es = require('element-stream'), tagstream = require('tagstream'); es.pipeline( input, tagstream(), // streams to transform XML events into whatever you want output );
test/demo.js for one example, which extracts the text from between
Each datum carried by the
data event out of the tag stream is an array.
Depending on the XML event, it'll be one of these:
Back-pressure is applied as expected. Due to some
event-stream magic, if
everything in the pipeline behaves properly then the first input stream will be
paused whenever a write fails on the final output stream. That's what I wanted
when I started writing this module, so I'm pretty happy.
npm install to ensure
tap is present, then