suppose i have an object with String property that has an XML string. like:
class myObject {
String xml;
@XmlElement(name = "xml", type = String.class)
public String getXml() {
return xml;
}
public void setXml(String xml) {
this.xml = xml;
}
}
i set an XML String to this property - such as
myObject.setXml("<xml>bbb</xml>");
now i want to marshal it using JAXB and i get:
<xml><xml>bbb</xml></xml>
where i want to get
<xml>bbb</xml>
how can i do it?