| d2r diego's weblog |
a google-rss bridge in javaI've been experimenting with the Google API for an upcoming Google-query feature in clevercactus and I thought that it would be cool to show how simple is to generate RSS 2.0 feeds (which validate) from within Java based on the Google query results, using only JAXP and SAX, which come built-in with JDK 1.4. (Incidentally, if you haven't checked the RSS spec recently I recommend another look, there have been a few --but key-- clarifications and improvements made to it in the past few weeks). The result is Google RSS Feeds which is a simple (emphasis on simple :-)) web service using pure Servlets that generates an RSS feed based on a query. (The feed generation is encapsulated in a separate class though, so it can be reused in other contexts). The whole thing took about an hour to write, package and deploy. Not bad. :) The page linked above is an example of the service working; and since the idea of all of this is to provide a sort of "code-tutorial" for Java, the sources are also available, provided under a simple (again!) open source license that allows modification and redistribution, both in source and binary forms, as long as the original copyright notice is maintained. As always, comments (and in this case, improvements!) are most welcome. Enjoy! :-) Categories: soft.devPosted by diego on August 30 2003 at 1:04 AM Comments (please see the comments & trackback policy).
Cool, I'll check that out. I did a similar sort of thing earlier in the year to do a real world test of RSSLibJ just after we wrote it. Nice thing being that you could define the output in whatever feed type you like. There was dependency with it though, that was the only thing. http://jasonbell.blog-city.com/read/24229.htm Jason, that looks great!! RSSLibJ would not be that big of a dependency in mind if someone wanted to use it--I just wanted to make it small and self-contained so that there it would be a simple, readily available source example of how to generate RSS (Using only JDK packages, given that there are so many XML libraries these days...), plus use the Google API and wrap all of that so that it's accessible through the web. Posted by: Diego at August 30, 2003 11:36 AMCopyright © Diego Doval 2002-2007.
|
