Parsing RSS feeds with ColdFusion MX 7

A recent project called upon us to parse RSS and present the feed in a simple list format.  Using the straight-forward XMLParse method in ColdFusion MX 7, this task was a cinch.  To speed up performance, the script caches the RSS feed once every fifteen minutes.

So that you don't have to go through the trouble that we did to perfect it, here's the script.  As always, if you decide to use this in your own project, don't forget to the leave the GNU GPL license in place.





        #html#
        
    
    
    <CFSET xml = mid(cfhttp.filecontent, Find("
    
        

#root.rss.channel.title.xmlText#

  • #DateFormat(item.pubDate.xmlText, "dddd, mmmm d, yyyy")#
    #item.description.xmlText#
  • There are none.
  • There are none.
#html#

About Aaron Collegeman

I started Fat Panda in 2010. I specialize in PHP and JavaScript development, for desktop and mobile applications, and I love WordPress. I'm also the lead developer at Squidoo. You should follow me on Twitter.

Comments