Icontem

feedMe: Retrieve and parse a RSS feed

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (10)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2012-10-06 (2 years ago) RSS 2.0 feedNot enough user ratingsTotal: 202 All time: 213 This week: 43Up
Version License JavaScript version Categories  
feedme 1.0Custom (specified...1.0AJAX, XML
Description Author  

This object can retrieve and parse an RSS feed.

It uses jQuery to send an AJAX request to retrieve a RSS feed from a given URL.

The object traverses the DOM structure of the retrieved XML feed and stores the parsed feed item values in object variables.

Picture of Karl Holz
Name: Karl Holz <contact>
Classes: 2 packages by
Country: Canada Canada
Age: 34
All time rank: 723 in Canada Canada
Week rank: 57 Up1 in Canada Canada Up

Details provided by the author  
@author Karl Holz <newaeon|a|mac|d|com>
@package feedMe

//#############################################################################################
 FeedMe - jQuery RSS 2.0 + ATOM/iTunes parser
 
feedMe is a basic RSS feed and Podcast parser with XML namespace support for your Javascript and jQuery web apps.
 
//#############################################################################################
 Reference for RSS 2.0
 
 http://www.rssboard.org/rss-2-0

 Reference for iTunes Podcasting 

 http://www.apple.com/itunes/podcasts/specs.html
 http://www.podcast411.com/howto_1.html
 
 Reference for ATOM
 
 http://tools.ietf.org/html/rfc4287
 


This class returns
- a normal Javascript object
- a JSON string
- a Base64 encoded JSON string

example:

$('link[type="application/rss+xml"]').each(function() {
 var link = $(this).attr('href');
 // for base64 encoded JSON string: feedMe(link,'base');
 // for JSON encoded string:        feedMe(link,'json');
 // for normal javascript object you only need an RSS url link
 var f = feedMe(link);
 /**  Do something with the object  */
});


The test.html has an example of printing the returned javascript object with prettyprint
- http://james.padolsey.com/javascript/prettyprint-for-javascript/

The base64 string can be decoded with the class in base64.js

- Base64.decode(<Base64 string>);

The JSON string can be turned into a javascript object with JSON.js

- JSON.parse(<JSON string>);
  Files folder image Files  
File Role Description
Files folder imagejs (5 files)
Accessible without login Plain text file LICENCE.txt Lic. Apache 2.0
Accessible without login Plain text file README.txt Doc. Readme files
Accessible without login Plain text file test.html Example Demo debug out
Accessible without login Plain text file test.nasa.sci.rss Data demo feed test 1
Accessible without login Plain text file test.nasa.video.rss Data demo feed test 2

  Files folder image Files  /  js  
File Role Description
  Plain text file base64.js Class used for base64 encode and decode
  Plain text file feedme.js Class Class that does the RSS parsing
  Plain text file jquery-1.7.2.min.js Class jQuery, needed by feedme.js
  Plain text file JSON.js Class used for JSON encode and decode
  Plain text file prettyprint.js Class PrettyPrint for displaying javascript object in the browser

 Version Control Unique User Downloads Download Rankings  
 100%Total:202All time:213
 This week:0This week:43Up
 User Comments (1)  
 
feedme is not working for me
2 years ago (Gayan Chathuranga)
40%StarStarStar