如何使用C#代码评论Xml特定Tage。 [英] How Can I Comment Xml Particular Tage By Using C# Code.

查看:69
本文介绍了如何使用C#代码评论Xml特定Tage。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用C#代码评论这一行。

< body>本周末别忘了我!< / body>

I want to comment this line using C# code.
<body>Don't forget me this weekend!</body>

推荐答案

如果您使用XDocument类来管理您的XML,您可以获得所选的XElement并将其替换为XComment。



https://msdn.microsoft.com/en-us/library/system.xml.linq.xcontainer.nodes% 28v = vs.110%29.aspx [ ^ ]
If you used the XDocument class to manage your XML, you could get the selected XElement and replace it with a XComment.

https://msdn.microsoft.com/en-us/library/system.xml.linq.xcontainer.nodes%28v=vs.110%29.aspx[^]


这篇关于如何使用C#代码评论Xml特定Tage。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆