JSoup Elements removes duplicates automatically

 ̄綄美尐妖づ 提交于 2019-12-02 16:44:57

问题


This is a weird problem which I don't understand why it would occur. But, doing the following:

Elements Fullcoursespaces = fullCourses.select("span[class=note-red]"); //Get the course times

Removes duplicates. So it returns two unique elements, but since the rest of the elements are duplicates of these unique elements, they are removed. When instead, it should fill up the elements list with the duplicates regardless. Is there a reason why this is happening?

Edit: As a side note, doing document.querySelectorAll("span[class=note-red]"); on the webpage gives me all the elements regardless if they are duplicates or not.

来源:https://stackoverflow.com/questions/32040601/jsoup-elements-removes-duplicates-automatically

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