Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Best XML Parsing Library?

Tags:

I have to parse some complex xml files inside my Android application. Is there any good library for doing that like there is TouchXMl for iPhone?

like image 654
Sharj Avatar asked Oct 13 '10 17:10

Sharj


People also ask

Which XML parser is recommended for Android?

We recommend XmlPullParser , which is an efficient and maintainable way to parse XML on Android. Historically Android has had two implementations of this interface: KXmlParser via XmlPullParserFactory.

What is XML parsing in Android?

Android DOM(Document Object Model) parser is a program that parses an XML document and extracts the required information from it. This parser uses an object-based approach for creating and parsing the XML files.

Is XML still used in Android?

XML is often used in front-end web development. It's also is used in back-end web development because some APIs use it to transfer data in a standard format. Android applications also depend heavily on XML to create layouts and store configurations, so you should learn XML if you're interested in mobile development.


2 Answers

Or you could use the org.xmlpull.v1.XmlPullParser - I've found it much easier to use than the SAX Parser and it has other benefits:

http://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html

http://www.bearcave.com/software/java/xml/xmlpull.html

like image 151
John J Smith Avatar answered Oct 29 '22 18:10

John J Smith


The SAX XML Parser comes already built into the Android SDK.

like image 20
Marc Bernstein Avatar answered Oct 29 '22 20:10

Marc Bernstein