this is the answer to a similar (but not quite the same) question that was related here:
. ( ) @ XmlValue getMessageText(), @XmlElement. "XmlValue", , XmlElement.
XmlValue . , :
- @ XmlAccessorType (XmlAccessType.NONE)
-, - . , JABX get/set XML , -, XmlValue, XML POJO ( ).
@XmlAccessorType( XmlAccessType.NONE )
@XmlRootElement(name = "announcement")
public class Announcement
{
...
@XmlValue
public String getMessageText(){
return this.messageText;
}
}
. JAXB , , , , . , , , , .