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.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

jquery - SimpleModal Confirm fails to submit form -