public static String textValueOf(Element htmlElement) {
List<Content> htmlContent = htmlElement.getContent();
if(htmlContent.isEmpty()) {
return null;
}
Content content = htmlContent.get(0);
if(!(content instanceof Text)) {
return null;
}
Text htmlText = (Text) content;
return normalized(htmlText.getValue());