开发者

How to display <tag> </tag> as opposed to <tag/> in XStream

开发者 https://www.devze.com 2023-02-07 07:48 出处:网络
When I serialize my objects into xml, empty tags 开发者_JAVA百科are set as <tag\\> I would like <tag></tag>.

When I serialize my objects into xml, empty tags 开发者_JAVA百科are set as <tag\>

I would like <tag></tag>.

How can I do this?


Since <tag></tag> and <tag /> mean exactly the same thing in XML, most XML parser choose to use the representation that takes less space.

As far as I know, this is not something a user can control.

0

精彩评论

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