jsoup 1.10.3 发布,Java 的 HTML 解析器

栏目: Html · 发布时间: 6年前

内容简介:jsoup 1.10.3 发布,Java 的 HTML 解析器

jsoup 1.10.3 发布了,该版本带来了更好的 CSS 选择器性能,Jsoup.Connection 改进和其他 bug 修复。

详情包括:

Improvements

  • Added Elements.eachText() and  Elements.eachAttr() , which return a list of an  Element's text or attribute values, respectively. This makes it simpler to for example get a list of each URL on a page:  List<String> urls = doc.select("a").eachAttr("abs:href"");

  • Improved selector validation for :contains(...) with unbalanced quotes.

  • Improved the speed of index based CSS selectors and other methods that use elementSiblingIndex, by a factor of 34x.

  • Added Node.clearAttributes() , to simplify removing of all attributes of a  NodeElement .

Fixes

  • Bugfix: if an attribute name started or ended with a control character, the parse would fail with a validation exception.

  • Bugfix: Element.hasClass() and the  .classname selector would not find the class attribute case-insensitively.

  • Bugfix: In Jsoup.Connection , if a redirect contained a query string with  %xx escapes, they would be double escaped before the redirect was followed, leading to fetching an incorrect location.

  • Bugfix: In Jsoup.Connection , if a request body was set and the connection was redirected, the body would incorrectly still be sent.

  • Bugfix: In DataUtil when detecting the character set from meta data, and there are two Content-Types defined, use the one that defines a character set.

  • Bugfix: when parsing unknown tags in case-sensitive HTML mode, end tags would not close scope correctly.

  • In Jsoup.Connection , ensure there is no Content-Type set when being redirected to a GET.

  • Bugfix: in certain locales (Turkish specifically), lowercasing and case insensitivity could fail for specific items.

下载地址: https://jsoup.org/download


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

垃圾收集

垃圾收集

琼斯 / 谢之易 / 人民邮电出版社 / 2004-4-1 / 45.00元

书围绕着动态内存自动回收的话题,介绍了垃圾收集机制,详细分析了各种算法和相关技术。 本书共12章。第1章首先介绍计算机存储器管理的演化和自动内存回收的需求,并引入了本书所使用的术语和记法。第2章介绍了3种“经典”的垃圾收集技术:引用计数(reference counting)、标记-清扫(mark-sweep)和节点复制(copying)。 随后的4章更详细地讨论了上述这些垃圾收集方式......一起来看看 《垃圾收集》 这本书的介绍吧!

URL 编码/解码
URL 编码/解码

URL 编码/解码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器