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
I've had a similar issue where when the XML was parsed back in, was treated as null when what I needed was so it would be parsed in as an empty string. I ended up working around this by adding an empty comment node to it so it ended up looking like this .
Sorry if this doesn't directly answer the question but this is top answer on google so thought someone might find this useful.