0

I'm trying to install jdom onto Eclipse so that I can use it in my Android project. I'd like it to be Android 1.6 but that hasn't worked, I've also been trying to get it to work on android 2.1 and that still hasn't worked. I've downloaded jdom 2.0.2 and I've put the .jar file into the build library and yet still

  import org.jdom.Document;

or any import org.jdom doesn't work.

Does anyone know what to do, and if not is there any other xml parser where you don't need to know the tag/element names before it parses them?

2 Answers2

1

SimpleXML works great on android. http://simple.sourceforge.net/

petey
  • 16,914
  • 6
  • 65
  • 97
1

With JDOM 2.0.2 you should be importing org.jdom2.* not org.jdom.*

Although, based on this question/answer, it may not work on versions prior to Android 2.2: https://stackoverflow.com/questions/10992743/using-jdom-2-0-1-with-android-below-api-2-2-problems-with-saxbuilder

Rolf

Community
  • 1
  • 1
rolfl
  • 17,539
  • 7
  • 42
  • 76