CodeCon2005: Open Source Feedparser API Session

CodeCon 2005 has a session led by Kevin Burton that discusses the Jakarta Feedparser open source api for parsing rss/atom feeds. Here's a breakdown of the Feedparser API from Apache's web site.

Jakarta FeedParser is a Java RSS/Atom parser designed to elegantly support all versions of RSS (0.9, 0.91, 0.92, 1.0, and 2.0), Atom 0.3 (and future versions) as well as easy ad hoc extension and RSS 1.0 modules capability.

FeedParser was the parser API designed from NewsMonster and has been donated to the ASF in order to continue development.

FeedParser differs from most other RSS/Atom parsers in that it is not DOM based but event based (similar to SAX). Instead of the low level startElement() API present in SAX, we provide high level events based on RSS parsing information.

Events are also given to the caller independent of the underlying format. This is accomplished by a Feed Event Model that isolates your application from the underlying feed format. This enables your applications to transparently support all RSS versions and Atom. We also hide format specific implementation such as dates (RFC 822 in RSS 2.0 and 0.9x and ISO 8601 in RSS 1.0 and Atom).

Here's an example of the FeedParser API implementation
FeedParser parser = FeedParserFactory.newFeedParser();

FeedParserListener listener = new DefaultFeedParserListener() {

public void onItem( FeedParserState state,
String title,
String link,
String description,
String permalink ) throws FeedParserException {

System.out.println( "Found a new published article: " + permalink );


parser.parse( listener, new URL( "").openStream() );

The session at CodeCon 2005 will discuss...
" criteria for FeedParser and provide code samples for getting up to speed fast. We will also discuss the requirements for following Postel's Law and building a flexible parser which is able to parse most real-world feeds even when in a somewhat broken state."
Looks pretty interesting, I'd love to see some examples from the conference.


Post a Comment

<< Home