A new release of the RSS and Atom Utilities (ROME) project ROME 0.9 (beta) is now available on the project's Java.net website. This new release includes fixes to Atom relative URI resolution, easier parsing for RSS feeds that use <content:encoded>, better support for mapping of RSS to and from Atom and numerous small fixes. Here are some quick links to the relevant release docs and files.
Let's review a couple of the changes that might affect the ways you use ROME, starting with the RSS parsing changes.
Easier parsing of RSS feeds that use <content:encoded>
Now that ROME includes built-in support for <content:encoded>, most user will no longer need to download and configure the separate and optional Content Module plugin. That's important because many RSS feeds use <description> as item summary and <content:encoded> as item content. It's also important because Atom supports both entry <summary> and <content>. So, whether you are parsing RSS or Atom the code to get an RSS item or Atom entry summary and content is the same. To this this, we made a number of small changes:
Here's a simple example that shows how to parse and print out parts of an RSS feed with entries that have both summary and content (using ROME's SyndFeed model):
String urlstring = "http://scripting.wordpress.com/feed/";That certainly makes things easier in most cases, but if you need full support for all of the features defined by the Content Module specification you can still download and use ROME's Content Module plugin -- it works exactly as it did before.
Better mapping for mapping Atom and RSS
As ROME users already know, ROME supports parsing feeds to three different object models the RSS model, the Atom model and "SyndFeed" -- an abstract model that you can use when you do not care about the source format of the feed. ROME includes converters to convert to and from the different models. We made two changes to improve the mapping done by the converters. First, as you saw above, we added support for Content to our RSS model. That allows us to map Atom summary/content nicely to and from RSS description/content, like so:
RSS <description> <--> SyndEntry.description <--> Atom <summary>
RSS <content:encoded> <--> SyndEntry.contents[0] <--> Atom <content>
Second, we added better support for Atom title and subtitles. In the old ROME, there was some potential for information loss because the SyndFeed model did not completely support the Atom model. Specifically, titles and subtitles did not support a type attribute. To fix that without breaking the API (i.e. ensuring that old ROME code still compiles and works), we added a number of new methods to make the type information available by returning title and description as SyndContent objects (which have type and value properties).
SyndFeed additions:
SyndEntry
We left the existing getters and setters in place, so your
existing code will continue to compile and work properly. And that's it
for the quick review...
What's next?
Download it, try it out, report bugs and give the ROME project some feedback and support. And what's next for ROME? I think ROME is just about ready for a 1.0 release, but there's one last feature we need to add: some form of feed security to strip potentially malicious JavaScript from feeds. Then onto ROME2.
For even more information on ROME...
There's a complete chapter on ROME in my recently published book RSS and Atom in Action.
This work is licensed under a Creative Commons License.
Copyright 2002-2007, David M Johnson (dave.johnson at rollerweblogger.org)
This is a personal weblog, I do not speak for my employer.

Buy now from Amazon.com
Or direct from Manning
| « October 2008 | ||||||
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
1 | 3 | |||||
5 | 6 | 7 | 9 | 10 | 11 | |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | |
| Today | ||||||
Allen Gilliland
Anil Gangolli
Dan Axon
Danese Cooper
Film Babble Blog
Geertjan's Weblog
Henri Yandell
James Robertson
Jim Grisanzio
Josh Staiger
Linda Skrocki
Pat Chanezon
Rama
Ruby Sinreich
Simon Phipps
Tim Bray
Will Snow
Janne Jalkanen
Joe Gregorio
Matt Raible
Mike Cannon Brookes
Rafe Colburn
Sam Ruby
Simon Brown
My other sites
Posted by Patrick Chanezon on December 14, 2006 at 06:45 PM EST #
Posted by George Safe on August 05, 2008 at 01:59 PM EDT #