Monday, September 05, 2005

Generate your RSS feed in Java

There are some open source projects that can help you in generating or reading RSS feeds in Java. I found only two libraries a bit mature, other code is often embedded in other open source products (jroller for example):
  • Informa: Does various RSS formats and Atom 0.3. Documentation is better than its alternative, but less focused (has some hibernate helper thingy, some lucene helper, etc.).
  • Sandler: There is no working homepage while I am writing this. But the code is of decent quality, supports Atom 0.3 and RSS 1.0. It is easy to use it. However in reality it is not much more than a wrapper around some XML parser specialized in generating an RSS structure or an Atom structure.
  • Ooops, I forgot another important one, Rome. This RSS/Atom framework with a catchy name is very similar to Informa, has good documentation and good looking code. Under the hood it makes use of jdom.
I personally use dom4j since I only need to generate RSS, and RSS, or Atom are just XML. I don't find it particularly verbose to use dom4j for that, and it is very flexible.

If you need to parse feeds, then those libraries might make sense and save you a bit of time. For generating, I think their main interest is to abstract you from the differences in formats. So if you need to handle different formats, a framework will allow you to do it through only one API, which can be a big time-saver.

Categories: , ,


  1. What about Rome? It has somehow become the de facto standard Java library for feed consumption and generation.

  2. Hi, with its 1.0 release, RIFE added an API for generating RSS and Atom feeds very easily. More information about this there:

  3. RSSLibJ was a nice one....


  4. Rome is my favorite so far. Nice, small little framework to generate/read RSS feeds of different types. However, if you want to parse an RSS feed which does not stick to the standard (eg. has some extra fields), you will have to go with a different solution. Rome doesn't seem to support custom fields.

    Indeed, you could simply create it using DOM4J or similar, but Rome saves you some hassle if you suddenly decide that you want to support different output/input formats.