I've been told by long-time Java developers that Apache's Rome module is the definitive library for reading & generating RSS & Atom feeds.
I've had a look at the library - it does not seem to be under active development right now. Is this really the best available? Specifically, I'm trying to write an Android application which will read in a number of feeds. I'm worried that Apache Rome might be to 开发者_JAVA百科heavyweight for a handheld device.
Are there any alternatives that I ought to consider? My main criteria are:
- Lightweight enough to run on a low-power device.
- Easy to use API
There is a repackaged version of Rome for Android: http://code.google.com/p/android-rome-feed-reader/. I know it is used by the Spring Android library.
For a recent project I tried all available methods for parsing rss and came to the conclusion that http://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html is the most decent one you might use. Easy to use and performant enough to run on low powered devices as well.
There is also this library I wrote: https://github.com/Pkmmte/PkRSS
It uses a fluent API for easy usage, it's very lightweight + fast, supports custom feed item properties, and is compatible with most RSS2 feeds by default but allows you to plug in your own custom RssParser to support all kinds of feeds.
精彩评论