I have a line of XML in my Atom feed (UTF-8) formatted with an ellipsis, like this.
<title type="html"><![CDATA[THIS WEEK IN HISTORY…]]></title>
To access the title, I call title.getText()
.
THIS WEEK IN HISTORY…
THIS WEEK IN HISTORY…
Here's my Title
class. What am I doing wrong with SimpleXML?
public static class Title {
@Attribute(name = "type", required = false)
String type;
@Text
String text;
public String getText() {
return this.text;
}
void setText(String text) {
this.text = text;
}
public String getType() {
return this.type;
}
public void setType(String _value) {
this.type = _value;
}
}
StringEscapeUtils.escapeHtml4()
from the Apache Commons Lang library