use of org.htmlcleaner.ContentNode in project FastHub by k0shk0sh.
the class PreTagHandler method getPlainText.
private void getPlainText(StringBuffer buffer, Object node) {
if (node instanceof ContentNode) {
ContentNode contentNode = (ContentNode) node;
String text = contentNode.getContent().toString();
buffer.append(text);
} else if (node instanceof TagNode) {
TagNode tagNode = (TagNode) node;
for (Object child : tagNode.getChildren()) {
this.getPlainText(buffer, child);
}
}
}
Aggregations