tags:

views:

72

answers:

3

Can anyone provide me with the info to parse an XML file in an Android application... any link on this will b helpful...

A: 

You can find a great explanation at this link.

You basically use the dom4j SAXReader to parse the XML using XPath.

Itsik
At the cost of bloating your application with an extra 500KB JAR file.
CommonsWare
You are right, although, when I built my android application 6 months ago, there wasn't sufficient built in xml support, and this is what i used.
Itsik
+1  A: 

There are 3 different ways to parse XML in android: SAX parser, DOM parser, pull parser. Which one to use depends on how big your xml is, and what you want to do with it. See working with xml in Android for details. (Which, incidentally, is the 1st link if you google "Android XML"].

Mayra
A: 

Hi,

Parsing XML in android is done in more than one ways in android.. Android.developer is the best reference that you can go for.

you can ieither use SAX or DOM.. Here is the link which will give u idea about parsing XMl

http://developer.android.com/reference/javax/xml/parsers/package-summary.html

go through the documentation first it will help u a lot

Rakesh Gondaliya