Category Archives: ROME

ROME 1.0RC2 Release

I’ve just pushed out a release of ROME core, ROME Fetcher and ROME modules.

For those who don’t know, ROME is a (the?) Java library for handling RSS and Atom. Unlike some other libraries it is pretty stable (18 months since the last release) and has a low number of dependencies (one – JDom – if all you need is parsing)

The annoucement, including links is at

The thing I’m most pleased about (and the number one source of complaints about ROME) is that I’ve pushed it to the Maven repository, so now it will be easier to use from Maven. Further details are at

ROME 0.9 released

Dave has done some great work getting the ROME 0.9 release out. There's also a new release of the ROME Fetcher.

I did an interesting fix for an ROME XML based security vulnerability in this release. I plan to blog about it in some depth later, but for the moment it's fair to say that the problem is somewhat obscure, but you probably should upgrade if you care about security. I also submitted patches to fix the same problem in Jakarta FeedParser, and Kevin's Tailrank version of FeedParser. A quick code inspection indicated that Informa is probably vulnerable, too, but I haven't got around to doing a patch for that.

Nelson (who pointed this out to us) has said about 3/4 of the XML applications he's encounted are vulnerable to this problem. After the lengths I had to go to fix it I'm not surprised – insecure by design is how I'd describe the XML APIs.

ROME sightings

A couple of new, very impressive ROME apps have been announced over the last few days.

Firstly, there was OpenVision TV's new I/ON Internet Video Console, which looks to be a very nice movie player that allows you to subscibe to movie channels.

Secondly, it was announced that the Beta My AOL feeds uses ROME. Currently the UI for this seems to be a little buggy (I can't add a new feed to it for instance), but when it works it is really, really good. Without a doubt it is a better aggregator than Google's iGoogle page or Yahoo's MyYahoo (which are both really only suitable for traditional news headlines). It would be better to compare it with MSN's, which is actually usable as a proper aggregator.

Delta-Encoded Feed Support in Rome

The Rome Fetcher now supports RFC3229 Delta-Encoded feeds (in CVS). The Rome Fetcher already supports GZipped feeds and conditional get. Hopefully, this additional feature should ease the burden on syndication client authors.

There are test cases in CVS, but I have failed to find any real world servers to test the delta-encoding support against, so any stories of succesful use (because obviously there could not possibly be any bugs…) would be appreciated.

Retrieving GMail Atom feed with Rome

Those of you with a GMail account might like this. It retrieves the GMail
Atom feed of you inbox status using the Rome Syndication libraries (Grab Rome 0.4 and Rome Fetcher 0.4 from You'll need to edit the BasicAuthenticator
class to set your username and password.

Gmail currently doesn't support conditional-gets or ETags, so unfortunately
it has to retrieve the entire feed each time.

public class Main {       
	public static void main(String args[] ) throws IllegalArgumentException, 
	MalformedURLException, IOException, FeedException, FetcherException {
		FeedFetcherCache feedInfoCache = HashMapFeedInfoCache.getInstance();
		FeedFetcher fetcher = new HttpURLFeedFetcher(feedInfoCache); BasicAuthenticator()); // turn on authentication
		SyndFeed feed = fetcher.retrieveFeed(new URL(""));
		int feedSize = feed.getEntries().size();
		System.out.println("Contains " + feedSize + " items");
		for (Iterator iter = feed.getEntries().iterator(); iter.hasNext(); )
			SyndEntry entry = (SyndEntry);
			System.out.println("\t excerpt: " +
		while (true) {
			try {
				Thread.sleep(1000 * 60 * 10); // check every 10 minutes
			} catch (InterruptedException e) {
				// ignore } System.err.print("Retrieving..");
				feed = fetcher.retrieveFeed(new
				int newFeedSize = feed.getEntries().size();
				// note that this won't detect new items if the feed size is at maximum
				if (feedSize != newFeedSize) {
					System.out.println("New messages detected. There are now " +
							newFeedSize + " items");
					int itemsToShow = newFeedSize - feedSize;                   
					int count = 0;
					for (Iterator iter = feed.getEntries().iterator();
					iter.hasNext();) {
						SyndEntry entry = (SyndEntry);
						System.out.println("\t excerpt: " +
						if (count >= itemsToShow) {
					feedSize = newFeedSize;
		static class BasicAuthenticator extends Authenticator {
			 * @see
			protected PasswordAuthentication getPasswordAuthentication() {
				if ("".equals(getRequestingHost())) {
					return new PasswordAuthentication("", "password".toCharArray());
				} else {
					return null;