Jsoup 1.8.3缺少的元素 [英] Jsoup 1.8.3 missing element
问题描述
我一直用Jsoup 1.7.2更新到1.8.3版本的大约一年和思想。
我曾经穿过一个问题迷迷糊糊的,请检查一下:
下面是文档:
I have been using Jsoup 1.7.2 for about a year and thought of updating to version 1.8.3. I have stumbled across an issue, please check it out: Here is the document:
<dl class="a">
<dt>
Total transfers
</dt>
<dd>
2
</dd>
<dt>
Gameweek transfers
</dt>
<dd>
2
</dd>
</dl>
<dl class="b">
<dt>
Team value
</dt>
<dd>
£99.2m
</dd>
<dt>
In the bank
</dt>
<dd>
£0.3m
</dd>
</dl>
现在,当我尝试选择DD像 doc.select(DD)
,它返回元素大小为3:
Now when I try to select "dd" like doc.select("dd")
, it returns an element with size 3 :
<dd>
2
</dd>
<dd>
£99.2m
</dd>
<dd>
£0.3m
</dd>
在理想的情况下旧版本的它用来返回所有的4个元素。
这可能是因为前两个DD是重复的。
这是一个错误或一个功能,你能告诉我怎么把所有的4个元素?
Ideally in the older version it used to return all the 4 elements. It could be because the first two "dd" are duplicates. Is this a bug or a feature and can you tell me how to get all the 4 elements?
推荐答案
它看起来像这个问题已经得到解决,将其固定于jsoup的下一个版本
It looks like this issue has been solved and will be fixed in the next version of jsoup
参考: https://github.com/jhy/jsoup/issues/614
这篇关于Jsoup 1.8.3缺少的元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!