Jsoup解析時ClassName中存在空格的問題

使用Jsoup解析html節點時,若是class名中含有空格將返回null。有兩種方法能夠解決: 假設className爲:list list-texthtml 使用select Elements elements = doc.select(".list").select(".list-text"); 直接根據屬性名、屬性值獲取 Elements elements = doc.getElement
相關文章
相關標籤/搜索