Problem
I’m communicating to a REST API which uses an atom feed as responses.
This means I need to parse this.
Solution
I want the solution to be as clean as possible.
Speed is a plus/low memory consumption is a plus but not really high priority.
Using a SAX parser
It’d be relativity easily to parse this myself, however it will probably break if I don’t follow the Atom spec to the letter.
I will probably create something that will be hard to maintain on it’s own and I’d rather avoid this.
Using a third party library
There seems to be quite a few out there that is written in java, some seems to maybe work in android but a lot of them are heavy and require lots of dependencies.
So, what’s your take on this, any suggestions?
It is not too difficult to use SAX to parse a subset of the Atom spec. You can ignore the elements that you are not interested in and process the important elements in a spec compliant manner.
The problem I have found with the 3rd party libraries is that they can be very very slow on Android, for the Atom I was parsing Rome was about 20x slower than my SAX parser.