Use jsoup or gquery for plain XML

时光毁灭记忆、已成空白 提交于 2019-12-06 06:26:17

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!