4 Replies Latest reply on Mar 5, 2008 7:50 PM by Kaplanconstruct

    RSS anyone?

      I can't get this to work and I'm sure the answer is obvious. I'm new to integrating RSS. I'm trying to display RSS feeds on my website from other URLs. Thanks for any light you can shed on this!

      here is my code in a standard .cfm page-----------------------------------------------------------------
      URLToPull = " http://www.easycfm.com/syndication/mostviewed.cfm";

      <cfhttp url="#URLToPull#"

      XMLContent = trim(cfhttp.filecontent);
      XMLContent = XMLParse(XMLContent);
      </cfscript>------------------------------------------------------------------------------- -------------

      Here is the error I get -------------------------------------------------------

      An error occured while Parsing an XML document.
      Content is not allowed in prolog.

      The error occurred in D:\Hosting\kapman\somthing\testrss.cfm: line 26

      24 : <cfscript>
      25 : XMLContent = trim(cfhttp.filecontent);
      26 : XMLContent = XMLParse(XMLContent);
      27 : </cfscript>
      28 : ----------------------------------------------------------------------------------------- -------

      The tutorial for this is below if your interested, thanks for any help!!

        • 1. Re: RSS anyone?
          SafariTECH Level 1
          It means that the parser is finding (what it considers) non-XML content as part of the XML page.

          It's been a whil esince I have done RSS/XML, but there are a couple of possible reasons.

          What I would suggest you do first is dump the XMLContent variable after it is first assigned in line 25 (comment out line 26 for now). If it shows some weird little characters at the beginning of the data content, then you will have to trim that out first before parsing the XML itself.

          Another reason may be the CDATA entries, but I'm pretty sure I've had it work with CDATA before.

          Post the output from the dump above and we can probably see the issue.

          • 2. Re: RSS anyone?
            Prasanth Kumar.S
            What is ur development environment? I tried your code and did not get any error while parsing. I am using CF 8.

            • 3. Re: RSS anyone?
              Kaplanconstruct Level 1
              Hey thanks for the followup, I'm on a Godaddy server running MX7. I was thinking that maybe they had some restrictions given the line "Content is not allowed in prolog." Whatever prolog is

              SafariTECH - I'll give that a go, thanks
              • 4. Re: RSS anyone?
                Kaplanconstruct Level 1
                Ahhh freakn Godaddy! Proxy issue. here is the fix. Thanks for the help guys!

                <cfhttp method="GET" url="blah.rss" proxyserver="proxy.shr.secureserver.net" proxyport="3128">