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?
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?
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).