Reading an RSS Feed in ColdFusion with CFFEED

Here’s a method to read an RSS feed with ColdFusion. This will work in ColdFusion 8 and later.

Code walkthrough:

  • Use CFFEED to read an RSS feed. This should return a Query object.
  • If the result is a Query Object, loop through and display the items.
  • If the result is not a Query Object, display an error message.

http://pastebin.com/embed_iframe.php?i=Fw7BhKj5

4 Replies to “Reading an RSS Feed in ColdFusion with CFFEED”

    1. You would need to repeat the process to read more than one feed. You could then do a Query of Queries UNION query to merge the two queries into one result set.
      I’ve found since writing that article that it’s better to retrieve RSS feeds via AJAX since the CFFEED tag will delay processing of your page until the feed is retrieved. This can result in seriously slow load times.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s