0
votes

I'm looking for a fast way to parse an RSS and Atom feed (the source changes periodically). I tried different approach:

  1. Writing my own parser: I made a very fast one using SAX

    • Problem: Most of the time the feed is full of non standard tags like <content:encoded> and the parsing miss the most important informations.
  2. Using a third party lib: I tried many libraries and the only one so far reading all the feeds i throw at it is ROME

    • Problem: Most of those libs (and especially ROME) are way too slow on the device (4-5x !!)

Any idea on how to speed this ? Is it even the best approach ?

1
Apache Abdera is faster than ROME, but its mostly for standard format which is ATOM. - S.D.

1 Answers

0
votes

What you call "non standard" is actually in fact valid RSS extensions. The problem is most RSS library does not handle RSS extensions very well.

The only way to do it is to hand craft your own RSS parser so you can handle the extensions that you care about.

Here is a working demo.

The XML library used is this https://github.com/thebuzzmedia/simple-java-xml-parser.

I just completed a fast RSS reader using above approach.