Android: Best XML Parsing Library?
Asked Answered
A

4

22

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?

Acuity answered 13/10, 2010 at 17:33 Comment(0)
P
11

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

Partridge answered 13/10, 2010 at 22:10 Comment(0)
O
6

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

Operetta answered 13/10, 2010 at 17:47 Comment(0)
T
2

Use Woodstox. It's a Stax pull parser, actually supports all of XML (unlike xmlpull that is bundled), efficient, mature. For more convenience, StaxMate helps too, uses Woodstox (or any other Stax parser) for parsing but exposes convenient cursors and writers; but is still 3x - 5x faster than DOM approach.

XmlPullParser that was mentioned works to some degree, but can't handle DTDs (not just validation but even basic character entities), gives cryptic error messages and doesn't have standard interface (SAX or Stax).

Tew answered 11/1, 2011 at 17:45 Comment(0)
A
1

Don't know the criteria by which "best" is defined. but here is a recent research paper that analyzes existing java xml framework with great details...

http://recipp.ipp.pt/bitstream/10400.22/1847/1/ART_BrunoOliveira_2013.pdf

Agist answered 20/4, 2016 at 5:49 Comment(1)
your link is deadContestation

© 2022 - 2024 — McMap. All rights reserved.