I've used all 3. Which one to use depends a lot on what you need to do. SAX is def quick but doesn't necessarily have the easiest interface to use. I use it and it's not that hard but I've found that for really simple parsing, PullParser is a little bit more straight- forward. With either of the two, you end up with basically the same structure of code, but PP code is a little easier to read IMO.
DOM is good for more complex stuff. You can walk through the hierarchy and pull out just the parts you want. On Feb 5, 8:01 am, "Mark Murphy" <mmur...@commonsware.com> wrote: > > I was wondering whether anybody, who has experience using the > > XmlPullParser class or others on the Android platform, has anything to say > > about its efficiency, well-known problems if any, suggestions for a better > > alternative, links for sample code etc. > > I saw one study (sorry, don't have the link handy) that indicated that on > Android SAX and XPP were roughly equivalent in terms of performance. XPP > really shines with the "binary XML" that resources get turned into as part > of the APK packaging process. DOM, as you indicated, is much slower, > though it has its uses. > > There is a link to some sample code on the main xmlpull.org site: > > http://xmlpull.org/v1/download/unpacked/doc/quick_intro.html > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > Android App Developer Books:http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en