java - Eliminating empty elements when marshalling with JAXB -
Using JAdbB (2) It is possible to make sure zero values can not be marked as empty elements. For example
@XmlRootElement (name = "root") protected public class root {@XmlElement (name = "name") string name; }
Currently if the name is Tall then I am marshaling
& lt; Root & gt; & Lt; Name / & gt; & Lt; / Root & gt;
I would like to produce
& lt; Root & gt; & Lt; / Root & gt;
Instead
I think that you have lost something .. as it is martial, string u null There should not be a string in the form of a string too. So in my opinion u must pass empty rather than empty zero.