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.
3abc449148446ebed56b842ec4871265?d=identicon&s=25 eduard (Guest)
on 2006-02-01 20: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
Ad7805c9fcc1f13efc6ed11251a6c4d2?d=identicon&s=25 Alex Young (Guest)
on 2006-02-02 00: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...
3abc449148446ebed56b842ec4871265?d=identicon&s=25 eduard (Guest)
on 2006-02-02 00: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
==============================
D0c2c500b173fdc29e851a18f87c3fbb?d=identicon&s=25 Thomas Dalla (tdallagn)
on 2011-05-17 15: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?
Bdf1f2ad97e7b9c9db1fa70e3cef48bf?d=identicon&s=25 Bryan Crossland (Guest)
on 2011-05-17 15:49
(Received via mailing list)
Sent from my iPhone

On May 17, 2011, at 8:02 AM, Thomas Dalla <lists@ruby-forum.com> 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.