jsoup 是一款 JAVA 的HTML 解析器,可直接解析某個URL位址、HTML文本內容。 比起之前用的HTMLHTTP://www.aliyun.com/zixun/aggregation/33959.html">Parser方便很多,而且更輕便。 語法類似jquery。
它提供了一套非常省力的API,可通過DOM,CSS以及類似于JQuery的操作方法來取出和運算元據。
This is a minor release, that primarily corrects a regression bug where the content-type of a document retrieved using Jso up.connect(String url) may not be correctly detected if specified in a meta tag.
Fixes and improvements
· Fixed issue with selector parser where some boolean AND + OR combined queries (e.g.meta[HTTP-equiv], meta[content]) were b eing parsed incorrectly as OR only queries (e.g. former as meta, [HTTP-equiv], meta[content])
· Fixed issue where a content-type specified in a meta tag may not be reliably detected, due to the above issue.
· Updated Element.text() and Element.ownText() methods to ensure <br> tags output as whitespace.
· Tweaked Element outer HTML method to not generate initial newline on first output element.
下載位址:
HTTP://jsoup.org/packages/jsoup-1.5.2.jar
HTTP://jsoup.org/packages/jsoup-1.5.2-sources.jar
HTTP://jsoup.org/packages/jsoup-1.5.2-javadoc.jar