Search code examples
javaxmldomjsoupgquery

Use jsoup or gquery for plain XML


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:

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?)

Solution

  • Without an answer after one month, I think that my own library will resolve my problems best:

    http://www.jooq.org/products/jOOX