Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    xml-objectspublic

    xml-objects

    version version js-standard-style npm downloads

    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

    Keywords

    none

    install

    npm i xml-objects

    Downloadslast 7 days

    14,219

    version

    1.0.1

    license

    MIT

    repository

    github.com

    last publish

    collaborators

    • avatar