The Ajax.RssReader class allows fetching and parsing RSS feeds in Javascript.
Requirements
- Prototype - http://prototype.conio.net/
Usage
function myCallback( rss ) {
alert(rss.channel.title);
for(var n=0; n<rss.items.length; n++) {
alert(rss.items[n].title);
}
}
function errorHandler( rss ) {
alert('An error has occured');
}
new Ajax.RssReader( 'test.xml', { onSuccess: myCallback, onFailure: errorHandler } );
Download
Download the Ajax.RssReader class from http://www.sayoutloud.com/javascripts/rssreader.js
Notes
This class is still under development. Version 0.1 is not a stable version; you may encounter problems during usage. Please send your comments and suggestions.
Contact
Author's e-mail address: r.schuil@gmail.com