Consuming Flickr RSS feed using ColdFusion
The following code will make a http request for a Flickr RSS feed, and output the results. You may want to cfdump the XMLContent variable to see what other values you can use from the feed. Enjoy...
<cfscript>
XMLContent = trim(cfhttp.filecontent);
XMLContent = XMLParse(XMLContent);
</cfscript>
<cfloop from="1" to="#ArrayLen(XMLContent.rss.channel.item)#" index="idx">
<cfoutput>
Link to Flickr: <a href="#XMLContent.rss.channel.item[idx].link.xmlText#">#XMLContent.rss.channel.item[idx].title.xmlText#</a><BR>
Image: <img src='#XMLContent.rss.channel.item[idx]["media:thumbnail"].xmlattributes.url#'><BR>
Author: #XMLContent.rss.channel.item[idx].author.xmlText#<BR>
Date: #XMLContent.rss.channel.item[idx].pubDate.xmlText#
</cfoutput>
<hr>
</cfloop>
Here is a demo of this in action.
