I've my object, configured with the code:
object.setName("");
marshaled into following XML:
<object>
<name></name>
</object>
But I want single tag:
<object>
<name/>
</object>
Is it easy to do with JAXB for all my objects at once?
UPDATE
Similar question: How to instantiate an empty element with JAXB
It's suggested to use prettifier javax.xml.transform.TransformerFactory.newTransformer(), but without explanation how to use it. Ideally my goal is to get exact code to configure JAXB to get the desired result.
Thanks.