问题
I was recently wondering about a good library for XML manipulation in Java: A nice Java XML DOM utility
Before re-inventing the wheel, porting jQuery to Java in jOOX, I checked out these libraries:
- http://jsoup.org
- http://code.google.com/p/gwtquery
But at closer inspection, I can see:
- jsoup does not operate on a standard
org.w3c.dom
document structure. They rolled their own implementation. I checked out the code and I doubt that it is as efficient and tuned as Xerces, for instance. For my use-cases, performance is important - jsoup seems tightly coupled with HTML. I only want to operate on XML, no HTML structure, no CSS
- gwtquery is coupled with GWT. I'm not sure how tightly
Has anyone made any experience with these libraries when using it only for server-side XML, not for HTML?
I'm interested in
- Performance benchmarks (maybe comparing it with standard DOM / XPath)
- Compatibility experience (easy to import/export to standard DOM?)
回答1:
Without an answer after one month, I think that my own library will resolve my problems best:
http://www.jooq.org/products/jOOX
来源:https://stackoverflow.com/questions/7036239/use-jsoup-or-gquery-for-plain-xml