* '</', and '>', '/>' is discarded, but all other whitespace is preserved.
*
* @return the content (not {@code null})
*/
public String getContent() {
Token token = attributeEnd.getNext();
if (token == contentEnd) {
return "";
}
//TODO (danrubel): handle CDATA and replace HTML character encodings with the actual characters
String content = token.getLexeme();
token = token.getNext();
if (token == contentEnd) {
return content;
}
StringBuilder buffer = new StringBuilder(content);
while (token != contentEnd) {
buffer.append(token.getLexeme());
token = token.getNext();
}
return buffer.toString();
}