REXML::ParseException - but the feed IS valid

I am using Ruby feedparser and when I try to parse this feed:

http://feeds.feedburner.com/Mobilecrunch

I get an error:

REXML::ParseException: Declarations can only occur in the doctype
declaration.

This feed does validate at feedvalidator.org. Any idea why it would
raise
an exception?

Thanks,
eduard

eduard wrote:

This feed does validate at feedvalidator.org
http://feedvalidator.org. Any idea why it would raise an exception?
Where’s the exception being raised? I can’t make REXML fail by hand on
that feed…

It seems that it doesn’t like the <img tag. But I am not sure.

eduard

=======================
#<REXML::ParseException: Declarations can only occur in the doctype
declaration.
Line:
Position:
Last 80 unconsumed characters:

<![CDATA[

<img id=“image56” style=“float; right;” src="
http://mobilecrunch.com/>
/usr/lib/ruby/1.8/rexml/parsers/baseparser.rb:325:in pull' /usr/lib/ruby/1.8/rexml/parsers/treeparser.rb:21:inparse’
/usr/lib/ruby/1.8/rexml/document.rb:178:in build' /usr/lib/ruby/1.8/rexml/document.rb:45:ininitialize’
/lib/feedparser/feedparser.rb:26:in
`parse’ /lib/feedparser/feedparser.rb:18:in

I still have the same problem with Ruby 1.9.2…

===============================
I 05/17/2011 21:56:20:387 00001638 APP| Error:
#<REXML::ParseException: Declarations can only occur in the doctype
declaration.
Line: 39
Position: 2342
Last 80 unconsumed characters:

<![CDATA[

SDM Information Session will be held as follows.

Date: May>

The Atom Feed is valid: http://www.sdm.keio.ac.jp/en/atom.xml

Any idea?

Sent from my iPhone

On May 17, 2011, at 8:02 AM, Thomas D. [email protected] wrote:

/>Date: May>

The Atom Feed is valid: http://www.sdm.keio.ac.jp/en/atom.xml

Any idea?

What’s on line 39 at position 2342 of the file?

B.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs