Description
rss-parser is a small library that turns RSS XML feeds into JavaScript objects. It runs in Node.js and in the browser. You can parse a feed from a URL with parseURL or from an XML string with parseString, and both callbacks and Promises are supported. The README shows Node.js examples with async and await. In TypeScript you can set a type to control the custom fields. For the web, the project provides pre-built browser distributions in its dist folder, and it recommends using a bundler such as webpack. The pre-built browser build needs a Promise polyfill. The output contains the feed and its items, and the README describes some fields: contentSnippet strips HTML tags and unescapes entities, and the dc: prefix is removed from field names. A full sample of the output format comes from a Reddit feed in the test folder. Version 3 introduced breaking changes. You now construct a Parser before parsing, parseFile is gone, options move to the constructor, and feed.entries became feed.items. The package is installed as described in the installation section.…
Highlights
- Parses RSS feeds from a URL or an XML string
- Works in Node.js and in the browser
- Typed custom fields in TypeScript
- Callbacks and Promises both supported
Ratings & Reviews
No ratings yet
Be the first to rate RSS Parser.
People also visit
RSS Parser FAQ
What is rss-parser?
A lightweight library that turns RSS XML feeds into JavaScript objects.
Can it run in the browser?
Yes. It ships pre-built browser distributions. The README notes that the browser build needs a Promise polyfill, and it recommends a bundler.
How do I parse a feed?
Create a new Parser, then call parseURL with a feed URL or parseString with an XML string.
What changed in version 3?
You construct a Parser first, parseFile was removed, options go to the constructor, and feed.entries is now feed.items.
What are the best RSS Parser alternatives?
Popular alternatives to RSS Parser include Bubo Reader, Feed me up, Scotty! and Feed Extractor. See all RSS Parser alternatives