Ticket #54 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

ParseException raised during parsing a valid RSS feed (Declarations can only ...)

Reported by: eduard@… Owned by: ser
Priority: normal Milestone: 3.1.4
Component: DOM Version: 3.1.2
Severity: normal Keywords: ParseExcepton, Declaration
Cc: Ruby version: 1.8.2
Operating system: Linux

Description

I keep getting this error message while parsing a valid RSS feed:

#<REXML::ParseException?: Declarations can only occur in the doctype declaration. Line: Position: Last 80 unconsumed characters: <![CDATA[<p>Filed under: <a href=" http://www.engadget.com/category/gadgets/" rel=> /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'

I can't copy the entire RSS feed in here since it's too big, but I always get this error while trying to parse  http://www.engadget.com/rss.xml

I searched online but couldn't find any information about this particular problem.

I am using Ruby 1.8.4 on Fedora Core 4 Ruby Feedparser is used to parse RSS

Thanks, eduard

Attachments

engadget-rss-file-ParseException Download (144.7 KB) - added by eduard@… 4 years ago.
This is the RSS file that I try to parse but get #<REXML::ParseException?: Declarations can only occur in the doctype declaration.

Change History

Changed 4 years ago by eduard@…

This is the RSS file that I try to parse but get #<REXML::ParseException?: Declarations can only occur in the doctype declaration.

Changed 4 years ago by eduard@…

Here's the output of:

ruby -vrrexml/rexml -e 'p REXML::Version,PLATFORM'

ruby 1.8.4 (2005-12-24) [i386-linux] "3.1.3" "i386-linux"

Changed 4 years ago by eduard@…

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.