xml-objects
v1.0.1
Published
Streaming wrapper around xml2js
Downloads
34,299
Readme
xml-objects
Streaming wrapper around xml2js
Pipe fully formed bits of xml to xml-objects to parse into javascript objects. Works great with xml-nodes.
Install
With npm do:
npm install xml-objects
Example
var request = require('request');
var xmlNodes = require('xml-nodes');
var xmlObjects = require('xml-objects');
request('http://news.yahoo.com/rss/entertainment')
.pipe(xmlNodes('item'))
.pipe(xmlObjects({explicitRoot: false, explicitArray: false, mergeAttrs: true}))
.on('data', function(data) {
console.log(data.title);
});
License
MIT