How to hide “null='true'” in JAXB xml

vantuan

New Member
I am producing an xml file via JAXB which results in elements that look like this:\[code\]<someData null="true"/>\[/code\]Here is what the Java class looks like:\[code\]@XmlType(propOrder={"someData"})public class someClass implements Serializable { private String someData; public String getSomeData() { return someData; } public void setSomeData(String someData) { this.someData = http://stackoverflow.com/questions/10437439/someData; }}\[/code\]Is there an annotation, or some other mechanism, that will produce an output that removes someData from the xml if it is nil, or produces an empty element like this?:\[code\]<someData/>\[/code\]
 
Back
Top