I am using Ruby-Feedparser and it works great, but when I try to parse a
feed in which description contains relative URL references, I get an error:
(REXML::ParseException) "#<REXML::ParseException: Declarations can only
occur in the doctype declaration.\nLine: \nPosition: \nLast 80 unconsumed
characters:\n<![CDATA[<p>Filed under: <a href=\" http://engadget.com/category/cellphones/<http://engadget.com/category/cellphones/\>"
rel=\">\n/usr/lib/ruby/1.8/rexml/parsers/baseparser.rb:325:
I validated the feed with feedvalidator.org before posting the message and
it said:
"This feed is valid, but may cause problems for some users." Obviously, I
am one of those users.
I'll write email to engadget and tell them about the problem.
Thanks for your help,
eduard
···
On 12/30/05, Jon Smirl <jonsmirl@gmail.com> wrote:
On 12/30/05, eduard <fishkei@gmail.com> wrote:
> I am using Ruby-Feedparser and it works great, but when I try to parse a
> feed in which description contains relative URL references, I get an
error:
>
> (REXML::ParseException) "#<REXML::ParseException: Declarations can only
> occur in the doctype declaration.\nLine: \nPosition: \nLast 80
unconsumed
> characters:\n<![CDATA[<p>Filed under: <a href=\"
> http://engadget.com/category/cellphones/\< http://engadget.com/category/cellphones/\>"
> rel=\">\n/usr/lib/ruby/1.8/rexml/parsers/baseparser.rb:325:
>
> Is there a workaround?
Source: http://engadget.com/category/cellphones/rss.xml
This feed does not validate.
line 404, column 1805: Undefined named entity: hellip [help]
... <item><title>Watch movies on your phones… while
they're stil ...
It is missing the external entity declaration.
From your mail you are getting an error about a malformed CDATA
section but I can't find a feed with that error.