OPML to HMTL using Informa
I've been having a few email discussions with a few of the blog readers about how I manage my blogroll and I decided to blog about it. Before I went out and purchased a copy of FeedDemon, a great RSS/ATOM feed reader, I had written my own crude feed reader. My feed reader used Informa for feed consumption and parsing and used a local MySQL database to keep track of my feeds subscription. Upon startup, the simple web application would load a list of my subscribed feeds from the database, parse them using Informa and save them locally. Worked well enough and let me learn more about Informa, which is really a very good RSS library for Java.
Now that I use FeedDemon, I output the blogs I read as an OPML file and then use Informa to create my HTML blogroll. Here's a little code snippet on how I use Informa's OPML support to parse my OPML file and iterate through the file to create the HTML that's included in my blog. I also stole Don Park's imageless RSS feed icon CSS to format my blogroll. Thanks Don - Great idea.
[code lang="java"]
try {
Collection feeds = OPMLParser.parse("file:///C:/projects/opml2html/data/blogs.opml");
sb.append("
{ 1 comment… read it below or add one }
[...] Informa is an open-source (LPGL) Java framework for parsing, processing, and creating syndication feeds. The current release supports RSS 0.9x, RSS 1.0 / RDF, RSS 2.0, and Atom 0.3. Informa also support for OPML documents but it hasn't seen any development since early June 2004. The news section of the Informa site claims that there is active development but I haven't seen anything from them yet. I have used Informa in the past and it works great but hasn't kept up with changing specifications. [...]