保存XML元素与使用LINQ to XML单引号的属性值 [英] Save attribute value of xml element with single quotes using linq to xml
本文介绍了保存XML元素与使用LINQ to XML单引号的属性值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何让我的XDocument对象保存元素的属性值的单引号?
How do I make the XDocument object save an attribute value of a element with single quotes?
推荐答案
如果这是绝对必要的单引号,你可以写你的XML文档字符串,然后使用字符串替换由单一改为双引号。
If it is absolutely necessary to have single quotes you could write your XML document to a string and then use a string replace to change from single to double quotes.
这篇关于保存XML元素与使用LINQ to XML单引号的属性值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文