Parsing and Writing RSS Using Jython and Project ROME

Submitted By: Josh Juneau

Introduction

RSS and Jython Using Project ROME

RSS is an old technology now...it has been around for years. However, it is a technology which remains very useful for disseminating news and other information. The ROME project on java.net is helping to make parsing, generating, and publishing RSS and Atom feeds a breeze for any Java developer.

Since I am particularly fond of translating Java to Jython code, I've taken a simple example from the Project ROME wiki and translated a Java RSS reader into Jython. It is quite easy to do, and it only takes a few lines of code.

Keep in mind that you would still need to build a front-end viewer for such an RSS reader, but I think you will get the idea of how easy it can be just to parse a feed with Project ROME and Jython.

Setting Up The CLASSPATH

In order to use this example, you must obtain the ROME and JDOM jar files and place them into your CLASSPATH.

Windows:

set CLASSPATH=C:\Jython\Jython2.2\rome-0.9.jar;%CLASSPATH%
set CLASSPATH=C:\Jython\Jython2.2\jdom.jar;%CLASSPATH%

MAC:

Parsing Feeds

Creating Feeds

Resources

[http://wiki.java.net/bin/view/Javawsxml/Rome05Tutorials Project ROME Tutorials]