Skip to main content
Inspiring
November 14, 2006
Question

Error reading/displaying RSS file

  • November 14, 2006
  • 3 replies
  • 538 views
I have tried almost half a dozen different scripts/CFCs to read an RSS file in so I can display it within my web page and every one gives me the same error... I've tried different rss files including the defaults the scripts are set to (which show up fine if you go to them in a browser). The error I keep getting is: An error occured while Parsing an XML document. Content is not allowed in prolog.

This is the code I am currently using but as I've said I've tried almost half a dozen other scripts and they all produce the same error, so I'm not sure what the problem is... the error says it is occuring on the XMLParse line. I just want to display the rss items within the design of my site rather than as a separate link the browser serves with no formatting.

<cfhttp url=" http://www.houseoffusion.com/groups/Flex/RSS.cfm"
method="get" />
<cfset HOF = XMLParse(cfhttp.filecontent)>

<cffile action="read" file="rss_2.xsl"
variable="RSS_2">

<cfoutput>#xmlTransform(HOF,RSS_2)#</cfoutput>
    This topic has been closed for replies.

    3 replies

    Inspiring
    November 14, 2006
    An error occurred while Parsing an XML document. Content is not allowed
    in prolog.

    Doesn't matter what xml file I use I get the same error :(

    <cfdump var="#cfhttp.filecontent#"> before the xmlParse() and see what
    you are actually retrieving from the RSS feed.

    Are you just running the code provided in your OP?
    Inspiring
    November 14, 2006
    An error occured while Parsing an XML document. Content is not allowed in prolog.

    Doesn't matter what xml file I use I get the same error :(
    Inspiring
    November 14, 2006
    What is the error you are receiving?

    I recognize that code as some I developed as a proof of concept a while
    ago. It works fine for me.