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

xmlparse() and google rss/atom feeds

Guest
Oct 22, 2007 Oct 22, 2007

Copy link to clipboard

Copied

Whenever I attempt to parse any google rss or atom feeds the xmlparse function says that they are invalid XML. Has anyone ever run into this before? I am able to parse any other feed that I have tried, Google seems to be the only issue. I am using CF7.

<cfhttp url=" http://news.google.com/?output=rss" method="get">
<cfset myXMLDoc = xmlParse(cfhttp.filecontent)>
TOPICS
Advanced techniques

Views

370

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

correct answers 1 Correct answer

Deleted User
Oct 23, 2007 Oct 23, 2007
yea it helps when you remember to do the simple things :)

google sees this coldfusion request as a bot, adding the useragent attribute to make it think its a normal browser request took care of it.

useragent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1"

Votes

Translate

Translate
LEGEND ,
Oct 23, 2007 Oct 23, 2007

Copy link to clipboard

Copied

> Whenever I attempt to parse any google rss or atom feeds the xmlparse function
> says that they are invalid XML.

Did you actually look at the data being returned to see if it WAS valid
XML?

When I run your code... I run into a very obvious problem (obvious if you
look at what's being returned by Google).

--
Adam

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
Guest
Oct 23, 2007 Oct 23, 2007

Copy link to clipboard

Copied

yea it helps when you remember to do the simple things :)

google sees this coldfusion request as a bot, adding the useragent attribute to make it think its a normal browser request took care of it.

useragent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1"

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
LEGEND ,
Oct 23, 2007 Oct 23, 2007

Copy link to clipboard

Copied

LATEST
Bingo. Well done.

--
Adam

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