SAX is 25% faster than XPP. Both ways, of course, depend on implementation details, although it seems the XPP way is more prone to be implemented in a slower way and by slower I mean 2-3x slower than "ideal" XPP implementation.
Best regards, Filip Havlicek 2011/3/25 Vinay Julme <[email protected]> > Androids Pull parser is also good and easy to use. Performance is just > below SAX parser, the only thing in favor is that its easier to use. > http://www.ibm.com/developerworks/opensource/library/x-android/ > > On Fri, Mar 25, 2011 at 6:03 PM, Filip Havlicek > <[email protected]>wrote: > >> Hi, >> >> if you are bound to XML, XmlSAXParser is the fastest way to parse it (that >> I know of). >> >> Best regards, >> Filip Havlicek >> >> 2011/3/24 Sebastien S <[email protected]> >> >>> Hi, >>> I'm developping an application where I had to synchronize my phone >>> with the entreprise server. >>> The response of the server is a xml file with each record between >>> <REC></REC> and I had to receive 19000 record. >>> What's the best way to parse it and add it to my content provider? >>> >>> >>> At the moment, I do my connection with the server: >>> [...] >>> HttpResponse httpResponse; >>> httpResponse = client.execute(request); >>> HttpEntity entity = httpResponse.getEntity(); >>> InputStream instream = entity.getContent(); >>> >>> And then, I parse the input stream: >>> XMLSyncParser xmlSyncParser = new XMLSyncParser(instream, sharedPrefs, >>> mContext); >>> xmlSyncParser.parse(event); // a xml pull parser implementation >>> >>> The parser, parse it and when he is at the end of the REC element, he >>> add it to the content provider. >>> >>> >>> Is there a better way to do it and a way who's taking less time? >>> >>> Thank you, >>> Sebastien >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Android Developers" group. >>> To post to this group, send email to [email protected] >>> To unsubscribe from this group, send email to >>> [email protected] >>> 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 [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> 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 [email protected] > To unsubscribe from this group, send email to > [email protected] > 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

