开发者

asp.net mvc setting XElement xml to empty

开发者 https://www.devze.com 2023-01-18 10:29 出处:网络
How can I do something like XEl开发者_高级运维ement xml =empty; Use the RemoveAll method to remove all child elements:

How can I do something like XEl开发者_高级运维ement xml =empty;


Use the RemoveAll method to remove all child elements:

xml.RemoveAll();

This will leave you with your existing XElement as is but if you wanted to clear that out too just create a new XElement entirely.

xml = new XElement("name");
0

精彩评论

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

关注公众号