Rome library example for parsing RSS and Atom feeds

Rome project was started by Java Web Services and XML Community. It is a set of Atom/RSS Java utilities that make it easy to work in Java with most syndication formats.

Rome can be used with both RSS(Really Simple Syndication) and Atom Feeds without worrying about the format or version of the feed.

The motivation for this project was to ESCAPE from Syndication Feeds Hell. Where ESCAPE stands for :

E – Easy to use
S – Simple
C – Complete
A – Abstract
P – Powerful
E – Extensible

Source : http://wiki.java.net/twiki/bin/view/Javawsxml/ProjectMotivation

Note: It has a dependency on JDOM (JDOM is document object model for XML designed for Java platform). Therefore you need jdom jar file along with rome library in order to execute the code.

I have created the following example to show the usage of Rome library. Click here to download the code and dependent jar in zip.

  • J

    This does not work out of the box. The problem is this: input.build(new XmlReader(httpcon));

    • Manish

      Hi J,

      You will need to use the code with the dependent libraries. As stated above:

      Note: It has a dependency on JDOM (JDOM is document object model for XML designed for Java platform). Therefore you need jdom jar file along with rome library in order to execute the code.

      Let me know if you still face issues.

  • Eric

    Thanks. I was getting the dependency issues as well before, but realised you created a batch file. It would be great if you included a shell script for the linux / mac users or made this as a maven project.

    • Manish

      Thanks for the suggestion Eric. You are right. I will try to make the changes soon.

  • This doesn’t work. 12-25 14:51:32.806: E/AndroidRuntime(22508): Caused by: java.lang.IllegalArgumentException: http://www.w3.org/2001/XMLSchema
    Happens on this line: feed = new SyndFeedInput().build(reader);
    Tried it wirh 3 URL’s…

  • great, after debugging for about 4 hours I just found out the error goes away when I use JDOM 2.0.5 version. Sorry about my previous comment :]