What is the most widely used parsing library for Android

I want to create an application that (among other things) can analyze channels downloaded over a network. Given that the standard Android + Core Java libraries do not provide a feed parser service, and I donโ€™t want to write it myself, can you designate a Java feed parser that will run on a low-spectrum Android device.

I am just starting to learn Android by filling out the Hello World examples that I would like to move to my first application. I want to do something that parses some ATOM or RSS feeds and displays some content in a GridView.

The user interface seems to be very well documented on Android, and Sun has many examples of how to get the URL, however I am not so good at parsing.

Previously, when I did this in Pythion, I use a general purpose parser that can parse almost everything (e.g. RSS, ATOM). There are many good Python implementations of this kind, however, I have not found anything like this in the standard Android library.

At work, I made (light) maintenance on enterprise Java applications. Generally, the general practice is to use any classes you like (e.g. Jararta Commons feed-parser) and just bind them to CLASSPATH. Desktop applications don't care how important the dependencies are, however I'm sure the big problem is compiling the APK package for use on a device with disabilities. Of course, I have to be very picky about which boxes I depend on, right? Can I just continue to use the same classes as for desktop applications?

Notes:

  • My background is in Python (only with easy Java experience)
  • Ideally I would like to use something popular (not necessarily the best), so I can get support.
  • Even better, I would like to use the built-in library functionality, so I do not need to add any third-party Jars to inflate my application.
  • Currently configured on Android 1.5 (because this is what my device is working with)
+7
java android
source share
5 answers

Rome appears to be one of the most popular RSS java libraries. I think it can also be used on Android.

+2
source share

Since RSS / Atom feeds are XML documents, you can use SAXParser , which is part of the standard Java libraries included with Android,

+3
source share

It's pretty easy to set up an SAX analyzer implementation, but the tricky part is the ability to analyze any channel under the sun.

You need to serve all formats of RSS 1, RSS 2, Atom, etc. Even then, youโ€™ll have to deal with poorly formatted feeds.

In the past, I encountered similar problems, so I decided to parse on the server and just get the parsed content. This allows me to run more complex libraries and a parser, which I can change without crowding out updates for my application.

I have the following service running on AppEngine, which can greatly simplify XML / JSON parsing. There is a fixed and simple structure for the answer. You can use this to parse

http://evecal.appspot.com/feedParser

You can send POST and GET requests with the following parameters.

feedLink: RSS feed response URL: JSON or XML as the response format

Examples:

For POST request

curl --data-urlencode "feedLink = http://feeds.bbci.co.uk/news/world/rss.xml" --data-urlencode "response = json" http://evecal.appspot.com/feedParser

For a GET request

evecal.appspot.com/feedParser?feedLink=http://feeds.nytimes.com/nyt/rss/HomePage&response=xml

My Android application also uses "NewsSpeak".

0
source share

Check out the lightweight Android library for reading parts of RSS feeds at https://github.com/ahorn/android-rss . I don't know if the most popular library for Android is, but I'm fine. I have not tried it yet.

0
source share

There is this new RSS library that I wrote: https://github.com/Pkmmte/PkRSS

It is very lightweight, efficient, fast, customizable and extremely easy to use. For example, the following code downloads and parses your RSS feed in the background stream:

PkRSS.with(this).load(url).async(); 

Easy, right? For this, there is more detailed information on the GitHub page.

0
source share

All Articles