fast-feed

Node.JS module for parsing newsfeeds (RSS 2 and Atom). It should be one of the fastest feed parsers. Uses RapidXML.

fast-feed

Node.JS module for parsing newsfeeds (RSS 2 and Atom). It should be one of the fastest feed parsers. Uses RapidXML.

Without callback (throws exception):

var fastFeed = require('fast-feed');
fastFeed.parse(xml_string);

With callback:

var fastFeed = require('fast-feed');
fastFeed.parse(xml_string, function(errfeed) {
    if (err) throw err;
    console.log(feed);
});

Do not parse content/description:

var fastFeed = require('fast-feed');
fastFeed.parse(xml_string, { content: false });

Or:

var fastFeed = require('fast-feed');
fastFeed.parse(xml_string, { content: false }, function(errfeed) {
    if (err) throw err;
    console.log(feed);
});

For Atom feeds:

{
    type: "atom",
    title: String,
    id: String,
    link: String,
    author: String,
    items: [{
        id: String,
        title: String,
        date: Date,
        author: String,
        summary: String,
        content: String,
        links: [{
            rel: String,
            href: String,
            type: String,
            hreflang: String,
            title: String,
            length: String,
            text: String
        }],
        link: String
    }]
}

Any attribute besides type might be missing. summary and content are missing when the content: false option is used.

For RSS 2 feeds:

{
    type: "rss",
    title: String,
    description: String,
    link: String,
    author: String,
    items: [{
        id: String,
        link: String,
        date: Date,
        title: String,
        author: String,
        description: String
    }]
}

Any attribute besides type might be missing. description is missing from items when the content: false option is used.

This package uses Nan and has been tested (install+running tests) on:

  • io.js 1.5.1
  • node 0.10.24
  • node 0.12.0

The binding code is covered with the MIT license. RapidXML is dual-licensed (MIT and Boost Software License, see LICENSE.rapidxml).