Jsoup解析时ClassName中存在空格的问题

使用Jsoup解析html节点时,若是class名中含有空格将返回null。有两种方法能够解决: 假设className为:list list-texthtml 使用select Elements elements = doc.select(".list").select(".list-text"); 直接根据属性名、属性值获取 Elements elements = doc.getElement
相关文章
相关标签/搜索