Java and DOM sucks
August 18th, 2005Java and DOM sucks. There is no decent open source DOM toolkit to be had.
Criteria:
- Efficient
- Has an intuitive and friendly API
- Uses javax.xml.namespace.QName instead of its own version or no QNames
- Has a commercial friendly license (LGPL doesn’t count because too many people are scared of it and conflicting interpretations)
DOM4J: Has #1, #4 and a little of #2
JDOM: Has #2, #4, not sure about #1
XOM: Has #1, #2
W3C DOM: Has #3 and #4, not sure about #1
Update: DOM4J performance isn’t too bad as a commenter pointed out. XOM is still faster I believe though.
August 19th, 2005 at 7:48 am
If you don’t like them, write your own.
August 19th, 2005 at 12:07 pm
Do you have any evidence that DOM4J is not efficient?
August 19th, 2005 at 6:14 pm
I have written my own - YOM, which is a XOM clone, but not too sure about the legal implications of that.
Regarding DOM4J, there are some benchmarks out there that you can look. Just do a little googling.
August 20th, 2005 at 2:19 am
Writing a facade to implement #3 should take you about two minutes
The XOM license is described in plain english, and not THAT scary.
August 20th, 2005 at 6:11 am
First, it is NOT ME who is scared. It is other people (like Apache people).
Second, writing a Facade has legal implications as well. It could quite probably fall under a derivitive work under the LGPL license.
August 21st, 2005 at 8:48 pm
The benchmark that I looked at doesn’t support your claim.