I have tried the following where it should cache the RSS feed
in the application.cfm page every 20 minutes but I am getting the
error
Error Occurred While Processing Request Element TIMESTAMP is
undefined in APPLICATION.
Any ideas on why I am getting this error ?
---
In my application.cfm
<CFIF (APPLICATION.TimeStamp EQ "") OR (DateDiff("n",
APPLICATION.TimeStamp, TimeFormat(NOW(), "hh:mm:s")) GT 20)>
<CFSET APPLICATION.TimeStamp = CreateTime(TimeFormat(NOW(),
"hh"), TimeFormat(NOW(), "mm"), TimeFormat(NOW(), "s"))>
<CFSET APPLICATION.weather_xml
=XMLParse(cfhttp.FileContent)>
<cfhttp url="
http://feeds.bbc.co.uk/weather/feeds/rss/5day/world/0008.xml"
method="GET" resolveurl="No"></cfhttp>
</CFIF>
In my display page I have the following code
<cfoutput>
<img
src="#application.weather_xml.rss.channel.image.url.xmlText#"
alt="#application.weather_xml.rss.channel.item.DESCRIPTION.xmlText#">
<cfloop index="x" from="1"
to="#ArrayLen(application.weather_xml.rss.channel.item)#">
<br>
#replace(application.weather_xml.rss.channel.item
.title.xmlText,
',', '<br>', 'ALL')# <br>
</cfloop>
</cfoutput>