开发者

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

I am working with VB.NET and I am facing a problem with XML serialization. When empty values exists in the object I am serializing, the XML file contains the f开发者_如何学Collowing tags:

<tagName/>

instead of:

<tagName></tagName>

I know that it's the same, but I want the start tag to close appropriately.


They are the same and it makes no difference. Any parser or reader understands the meaning, so why is this so important to change?

I find the current behavior better as it will result in smaller files.

Regardless, there is no way to override this behavior.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜