开发者

XMLWriter () Replace blank strings

I am usi开发者_StackOverflow社区ng XMLWriter to create an XML output of my MySQL Database, and I would like to know how I could prevent this happening <hello></hello> by doing this <hello>nil</hello>

So basically replace "" with "nil".


<hello></hello> is proper for indicating an empty node in XML; the other way is <hello />. Replacing with nil means it's no longer an empty node; it's a node with the text content nil.

If you do that replacement, you're changing the meaning of the data in the XML. This is a terrible idea.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜