• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFHTTP Not Parsing RSS for Display

New Here ,
Oct 03, 2007 Oct 03, 2007

Copy link to clipboard

Copied

I am using CF6.1, Windows Web Server 2003, on a Dell Server:

I am having a problem with one specific RSS feed to display on a website (with permission), but can not get it to work. I am able to get RSS feeds from other sources to work using cfhttp and xmlparse(), just not this one. I need someone who knows RSS and XML to give me some direction. The feed from the source works fine through an RSS Reader and IE7, just not using the normal tools I have with CF.

The specific feed is from GoUpstate.com Sports to display in assocation with a local Radio Station (www.espn1400am.com). The link is http://www.goupstate.com/apps/pbcs.dll/section?Category=RSS07&mime=xml. I have tried to do a simple cfhttp, xmlparse, and dump without success.

Here is what I get in the CFCATCH:
Message: Document root element is missing.
Err Number: 0
Type: Expression

You can see where I am running some tests at http://www.searchupstate.com. Here I am using the same code to pull RSS Feeds froms several sources, I just can't get the aforementioned feed from GoUpstate.com to work.

Thank you for your help in advance,

David G. Moore, Jr.
UpstateWeb LLC
TOPICS
Advanced techniques

Views

419

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 05, 2007 Oct 05, 2007

Copy link to clipboard

Copied

<cfset URLtoPULL=" http://www.goupstate.com/apps/pbcs.dll/section?Category=RSS07&mime=xml">
<cfhttp url="#URLtoPULL#" method="GET" timeout="15">
<cfhttpparam type="Header" name="Accept-Encoding" value="deflate;q=0">
<cfhttpparam type="Header" name="TE" value="deflate;q=0">
</cfhttp>
<cfset objRSS = xmlParse(cfhttp.filecontent)>
<cfdump var="#objRSS#">

This worked for me.

I've seen this in the past. The web server is set to compress output. so adding
<cfhttpparam type="Header" name="Accept-Encoding" value="deflate;q=0">
<cfhttpparam type="Header" name="TE" value="deflate;q=0">
to your <cfhttp> request deflates the response.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 05, 2007 Oct 05, 2007

Copy link to clipboard

Copied

LATEST
Skemcin,

Thank you so much. You hit the issue right on the head. It worked perfectly.

In great appreciation,

David G. Moore, Jr.
UpstateWeb LLC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation