Library to query HTML with XPath in Java?

后端 未结 5 422
失恋的感觉
失恋的感觉 2020-12-03 16:31

Can anyone recommend me a java library to allow me XPath Queries over URLs? I\'ve tried JAXP without success.

Thank you.

5条回答
  •  情话喂你
    2020-12-03 16:50

    I've used JTidy to make HTML into a proper DOM, then used plain XPath to query the DOM.

    If you want to do cross-document/cross-URL queries, better use JTidy with XQuery.

提交回复
热议问题