DOM ( Document Object Model ) parsing is similar to using DOM in Javascript to represent a document as a tree of nodes. This is convenient to use, but it is also the slowest way to parse XML documents.
SAX, on the other hand, is the fastest way to parse XML documents on Android ( source ). It includes an indication of a handler class that implements certain methods that are called when the document is parsed. This is a bit cumbersome to use, but I recommend it for large documents or if XML parsing proves to be a performance bottleneck.
Android provides some helper classes to make SAX easier to use. Basically, instead of defining a class, you can simply register separate event handlers for the events of interest to you. It still uses the SAX parser backstage.
The pull analyzer allows you to pull events in a loop and process the ones you need. In my opinion, this is easier to use than the SAX parser, but a bit slower. It should be fast enough for most applications.
source share