Forum: Ruby on Rails REXML::ParseException - but the feed IS valid

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
eduard (Guest)
on 2006-02-01 21:25
(Received via mailing list)
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
Alex Y. (Guest)
on 2006-02-02 01:05
(Received via mailing list)
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...
eduard (Guest)
on 2006-02-02 01:41
(Received via mailing list)
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[<p><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:in `parse'
/usr/lib/ruby/1.8/rexml/document.rb:178:in `build'
/usr/lib/ruby/1.8/rexml/document.rb:45:in `initialize'
/lib/feedparser/feedparser.rb:26:in
`parse' /lib/feedparser/feedparser.rb:18:in
==============================
Thomas D. (Guest)
on 2011-05-17 17:02
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[<p>SDM Information Session will be held as follows.<br /><br
/>Date: May>
===============================

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

Any idea?
Bryan C. (Guest)
on 2011-05-17 17:49
(Received via mailing list)
Sent from my iPhone

On May 17, 2011, at 8:02 AM, Thomas D. <removed_email_address@domain.invalid> 
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 topic is locked and can not be replied to.