Erlang Central

How to write an RSS aggregator

Revision as of 20:01, 11 April 2007 by Nga489 (Talk | contribs)




How to write an RSS aggregator


In the article: What is RSS, they describe the various RSS formats and create a simple RSS aggregator written in Python. Inspired by this I decided to do the same in Erlang.

In this example I have been using OTP-R10B-3 release and the jerl Jungerl start script. By using the Jungerl start script I automatically get www_tools in my path. This will probably also make it possible to make the example work in older Erlang releases since Jungerl also contains xmerl before it was added into OTP.

Getting information from an RSS feed.

Let us use the RSS feed at Slashdot in this example. The RSS info can be reteived from the URL: We make use of a function in the ibrowse package to retrieve the file.

{{CodeSnippet|Code listing 1.1: Getting the RSS info|