I am using Coldfusion 8, and having some trouble in parsing the RSS feed that needs to be displayed on my company's Intranet. The legacy code was iterating through items in XmlChildren, however it has hardcoded the type to the each position. And this is where the problem comes.
<cfloop index="itms" from="1" to="#ArrayLen(XMLRoot.channel.XmlChildren)#">
<cfset theItem = XMLRoot.channel.XmlChildren[itms]>
<cfset tmp_item = theItem.XMLChildren>
<!--- Retrieve the item data --->
<cfset item_title = tmp_item.xmltext>
<cfset item_link = tmp_item.xmltext>
<cfset item_description = tmp_item.xmltext>
<cfset item_date = parseDateTime(Replace(tmp_item.xmlText, ' GMT', ''))>
The last line is where I am getting the error. The exact error being
StackTracecoldfusion.runtime.locale.CFLocaleBase$InvalidDateTimeException: <p><img alt="irish-flag-640" src="http://www.hellenicshippingnews.com/images/stories/flags/irish-flag-640.jpg" width="120" height="100" />Ireland has received a first tranche of 3.6 billion euros ($4.9 billion) from the euro zone rescue fund, slightly more than the initial amount agreed, a fund source told Reuters on Sunday.</p> is an invalid date or time string.
Now, the exact page from which I am trying to extract the content is
I am quite new to this entire programming, so if you can pinpoint the changes needed then that would be really great.
Incase it helps, the RSS feed is http://www.hellenicshippingnews.com/...=feed&type=rss