Skip to main content
Known Participant
December 10, 2007
Question

Consuming BBC Weather RSS Feeds

  • December 10, 2007
  • 3 replies
  • 937 views
I am trying to display the BBC weather feeds through Coldfusion, however I am getting the following error

---
An error occured while Parsing an XML document.
The element type "link" must be terminated by the matching end-tag "".
----

However If I change the rss feed location to http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/wales/rss.xml for example the script works ?

Any ideas why the weather rss feeds from the BBC are not working ?

http://backstage.bbc.co.uk/data/WeatherFeeds?v=p12

This is my code

    This topic has been closed for replies.

    3 replies

    Participating Frequently
    December 12, 2007
    First step is just cfdump and/or save the cffile.fileContent and validate the output. If you're using Dreamweaver, open the saved information validate as XML under the File menu. This should give you some idea of what's going on.

    You mention you're using Enterprise, Do you have a proxy or hardware firewall setup or some other type of filtering going on? This is where looking at the received content before you parse the xml will come in handy.
    ramboAuthor
    Known Participant
    December 13, 2007
    Hi

    Thanks for that it was a proxy problem so I am getting the feed through.

    However the following line in my script
    <img src="#weather_xml.rss.channel.item.url.xmlText#" alt="#weather_xml.rss.channel.item.title.xmlText#">

    is causing the following error ?

    Element URL.XMLTEXT is undefined in a Java object of type class coldfusion.xml.XmlNodeMap referenced as

    My code is below
    Participating Frequently
    December 10, 2007
    no doc type, just your code
    ramboAuthor
    Known Participant
    December 12, 2007
    This is very strange, I am still getting the following error

    An error occured while Parsing an XML document.
    The element type "link" must be terminated by the matching end-tag "".

    Any ideas on why I am getting this error ? - I am on CFMX 7.0
    Participating Frequently
    December 10, 2007
    Tried your attached code on CFMX 7 and didn't have a problem. I wouldn't say the feed is one of the cleanest I've seen, there seems to be an awful lot of white space. Perhaps they've fixed the link not being formatted properly since your post.
    ramboAuthor
    Known Participant
    December 10, 2007
    Hi

    Thanks for that, I am still getting that error ?

    Could you attach your complete code including the doctype etc you are using on your page, so I can try it out my side to see if I will still be getting the same error with your code.