Jerichoを使用して、次のようなものを解析する必要があります。
<html>
<div class="title">
Spoon bows
<br/>
<span>
A Matrix scene.
<br/>
Matrix 1
</span>
</div>
</html>
「スプーンボウ」を解析したいのですが<div>
、次のコードを使用してタグ内のコンテンツ全体を取得します。
List<Element> list = item.getAllElementsByClass("title");
if(list!=null) {
Element title = list.get(0);
if(title!=null) {
String text = title.getContent().getTextExtractor().toString();
}
}
}