abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Takasho <taka...@gmail.com>
Subject Parsing errors using every example
Date Wed, 05 Sep 2007 15:02:36 GMT
Hi All,

I'm just trying to create a simple parser using the examples dotted around
the net and also from the examples provided. I'm building from the trunk and
its nice to see 0.30 shaping up so well.

Is RSS 2 support dropped from abdera as I can parse Atom 0.3 docs just fine
but when I parse RSS I get this error :

Exception in thread "main" java.lang.ClassCastException:
org.apache.abdera.parser.stax.FOMExtensibleElement cannot be cast to
    at uk.co.orange.elmer.ParseFeed.main(ParseFeed.java:30)

The code I am using is:

Abdera abdera = new Abdera();
URL url = new URL("http://mylocalmachine.com/feeds/blog");
Parser parser = abdera.getParser();
InputStream in = url.openStream();
Document<Feed> doc = parser.parse(in);
Feed feed = doc.getRoot();

The feed is a standard RSS 2 feed and works fine in firefox et al.

I have separated the functions deliberately so that I can debug where the
error is and the line it dies on is the last one - Feed feed = doc.getRoot

Its probably something I've missed but I'm making up documentation as I'm
going along.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message