1
我需要从下面的标记中提取文本76
和Houses, Apartments for Rent in
。我如何使用Jsoup选择器来做到这一点?Jsoup解析器如何从特定类中获取文本
我试图
Elements elem=doc.select("h1Title >span.id");
String Pagetitle=elem.text();
,但没有奏效。
<div>
<h1 class = "h1Title">
<span id='resultsCount'>76</span> Houses, Apartments for Rent in <span id='loc'>Koramangala</span>
</h1>
</div>
76 Houses, Apartments for Rent in Koramangala