This article does the comparison for performance. (Perhaps the link Mark was referring to) http://www.developer.com/xml/article.php/10929_3824221_2/Android-XML-Parser-Performance.htm
*Conclusion:* *When Parsing on the Handset is Required: Stick with SAX* *When parsing of XML on the Android handset is required, I would recommend using the SAX parser, especially where the file sizes are relatively small.* The article does not take into consideration some of the things mentioned in this thread: "binary XML" and code readability. Carmen -- Carmen http://www.twitter.com/CarmenDelessio http://www.talkingandroid.com http://www.facebook.com/BFFPhoto http://www.twitter.com/DroidDrop On Fri, Feb 5, 2010 at 5:18 PM, Emre A. Yavuz <eayl...@hotmail.com> wrote: > Thanks to you both ... > > Cheers, > > Emre > > > Date: Fri, 5 Feb 2010 09:23:54 -0800 > > Subject: [android-developers] Re: DOM, SAX or XMLPullParser ? Any > suggestions ? > > From: rbgrn....@gmail.com > > To: android-developers@googlegroups.com > > > > > 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<android-developers%2bunsubscr...@googlegroups.com> > > For more options, visit this group at > > http://groups.google.com/group/android-developers?hl=en > > ------------------------------ > All your Hotmail contacts on your phone. Try it > now.<http://go.microsoft.com/?linkid=9708118> > > -- > 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<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- 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