Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New Coder
    Join Date
    May 2009
    Posts
    16
    Thanks
    3
    Thanked 0 Times in 0 Posts

    RSS Parsing in Cold Fusion 8

    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.


    Code:
        <cfloop index="itms" from="1" to="#ArrayLen(XMLRoot.channel[1].XmlChildren)#">
        <cfset theItem = XMLRoot.channel[1].XmlChildren[itms]>
        <cfset tmp_item = theItem.XMLChildren>
        <!--- Retrieve the item data --->
        <cfset item_title = tmp_item[1].xmltext>
        <cfset item_link = tmp_item[2].xmltext>
        <cfset item_description = tmp_item[3].xmltext>
        <cfset item_date = parseDateTime(Replace(tmp_item[4].xmlText, ' GMT', ''))>
    The last line is where I am getting the error. The exact error being


    Code:
    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

    http://www.hellenicshippingnews.com/...news&Itemid=97


    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
    Last edited by rookiecoder; 02-07-2011 at 08:44 PM.


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •