Parsers Used In Android
Which all parsers are used in Android for XML parsing? Right now I know only SAX, XMLPullParser and DOM parsers. It will be really great if someone can tell the efficiency comparis
Solution 1:
this guy has talked exactly for what you have asked.
http://www.ibm.com/developerworks/opensource/library/x-android/
though about efficiency you can find it while he is closing
Solution 2:
SAX:
1. Parses node by node
2. Doesnt store the XML in memory
3. We cant insert or delete a node
4. Toptobottom traversing
DOM
1. Stores the entire XML document into memory before processing
2. Occupies more memory
3. We can insert or delete nodes
4. Traverse in any direction.
check this:
http://www.developer.com/ws/article.php/3824221/Android-XML-Parser-Performance.htm
http://www.differencebetween.net/technology/difference-between-sax-and-dom/
Solution 3:
Another XML Parser that I've found very useful is the Simple Java XML Parser (SJXP) available at http://www.thebuzzmedia.com/software/simple-java-xml-parser-sjxp/. It uses the XPP3 pull parser, and aims for efficiency while still being very simple to use.
The source code is also available, with great inline commenting if you want to see how it works.
Post a Comment for "Parsers Used In Android"