We have an internal library that uses the org.w3c.dom API to read and write XML. When I tried to use this library on Android, I found that it no longer works. It seems that Android only implements a subset of the DOM API. I donβt know the reasons for this, and I know that it is fixed in Android 2.2, but I still need to focus on older devices.
I know several alternative DOM libraries for "regular" Java, such as XOM and Dom4j. Can anyone recommend a DOM library that meets the following goals?
- It should work on Android.
- It should be small (because people pay per MB).
- Ideally, it should look like the org.w3c.dom API, since I need to rewrite the existing code.
It is probably impossible to meet all three goals, but with two I would already be happy. Also, out of curiosity, does anyone know why the DOM API is not fully supported? I can understand the reasons for not implementing Java Sound, etc., but XML seems very important to me.
source
share