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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060201/4494bc39/attachment.html
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... -- Alex
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 ============================= On 2/1/06, Alex Young <alex@blackkettle.org> wrote:> > 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... > > -- > Alex > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060201/ba96acc5/attachment.html
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? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Bryan Crossland
2011-May-17 13:48 UTC
Re: Re: REXML::ParseException - but the feed IS valid
Sent from my iPhone On May 17, 2011, at 8:02 AM, Thomas Dalla <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> 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? >What''s on line 39 at position 2342 of the file? B.> -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.