Java – What is the best way to work with XML in Android

What is the best way to work with XML in Android… here is a solution to the problem.

What is the best way to work with XML in Android

Android

devices are much slower and have much less memory than PCs/servers, so what’s the best way to process XML in Android? I have a very complex set of XML that needs to be parsed. Either SAX or DOM can lead to too much code. Does anyone have a good suggestion? I want to make it clean and fast

Solution

The type of parser you use in your application depends on your requirements. You can also try XMLPullParser. You can see the performance of all three parsers here.

http://www.developer.com/ws/article.php/10927_3824221_2/Android-XML-Parser-Performance.htm

There are also some third-party XML parsers available… I used this parser in one of my previous apps and it was pretty fast. It has an Xpath implementation.

http://vtd-xml.sourceforge.net/

Related Problems and Solutions