I am using a Transform object to save my XML file but it seems to drop empty text nodes. Is there any way to create (and keep) a text node with an empty string
Transform
You should anotate your field with
@XmlElement(nillable=true)
Just set it to null and you will get:
It indicates that an element is empty.
Otherwise, if you want just open and close tags, just set its value to "" (empty String). And you will get: