Is there a way to avoid self-closing tags when using XML serialization?

I work with VB.NET and I am facing a problem with XML serialization. When there are empty values ​​in the object I'm serializing, the XML file contains the following tags:

<tagName/>

instead:

<tagName></tagName>

I know this is the same, but I want the start tag to close appropriately.

+5
source share
1 answer

They are the same, and it does not matter. Any parser or reader understands the meaning, so why is it so important to change?

I find the current behavior is better, as this will lead to smaller files.

Regardless, there is no way to reverse this behavior.

+2

All Articles