How to marshal empty string to a single tag

前端 未结 1 1602
被撕碎了的回忆
被撕碎了的回忆 2021-01-28 09:41

I\'ve my object, configured with the code:

object.setName(\"\");

marshaled into following XML:


    &         


        
      
      
      
1条回答
  •  南笙
    南笙 (楼主)
    2021-01-28 09:56

    The answer to my question was found in another question How to instantiate an empty element with JAXB where it's suggested to either use a prettifier or don't do anything at all because both versions of XML are equivalent.

    0 讨论(0)
提交回复
热议问题