Android SDK: How to Parse a Read-Only XML File with Jdom


show more Parsing a read-only XML file with JDOM provides you with in-depth training on Developer. Taught by David Gassner as part of the Android SDK: Local Data Storage show less
please wait ...

Parsing a read-only XML file with JDOM

I've previously described how to parse XML files using the XML Pull Parser, a streaming parser that's included with the Android SDK. I'm now going to describe an alternative approach using a parser called JDOM. JDOM is a third-party open-source, free solution that works well in both generic Java applications and in Android apps. You can download the binaries for JDOM, but I've included the JAR file. That is the library that you need to include in your application in the exercise files.

I'll get out of the browser and I'll go to my Exercise Files folder. Under the Assets folder, there's a subfolder called Software, and there's a file there called jdom-2.0.3.jar. You can use this or any later version. I'll copy the JAR file to the clipboard. Then I'll go back to Eclipse. Within Eclipse, I'll go to the libs folder of my new project, XMLJDOMParser. I'll go to that libs folder and I'll paste the file into place.

In addition to adding the JAR f...

Parsing a read-only XML file with JDOM
Video duration: 7m 59s 3h 41m Intermediate

Viewers:

Parsing a read-only XML file with JDOM provides you with in-depth training on Developer. Taught by David Gassner as part of the Android SDK: Local Data Storage

Subject:
Developer
Software:
Android Java
Author:
please wait ...