This is the error I am getting below even though weather_xml has been
defined in the application.cfm page

i.e. <CFSET APPLICATION.weather_xml =XMLParse(cfhttp.FileContent)>

ERROR IS
----
Element WEATHER_XML is undefined in APPLICATION.
----

My application.cfm page is

----
<cfset Application.TimeStamp="#TimeFormat(now(), 'hh:mm:ss')#">

<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"))>

<cfhttp url="http://feeds.bbc.co.uk/weather/feeds/rss/5day/id/3314.xml";
method="GET" resolveurl="No"></cfhttp>
<CFSET APPLICATION.weather_xml =XMLParse(cfhttp.FileContent)>
 
</CFIF>
----

My weather page is

----
<head>
</head>

<body>
<cfdump var="#application.weather_xml#">

<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[x].title.xmlText, ',',
'<br>', 'ALL')#
<br>

</cfloop>
</cfoutput>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295169
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to