开发者

Using Linq to XML, is it possible to store " in an attribute?

Using Linq to XML, is it possible to store &q开发者_JS百科uot; in an attribute.

So if I look at the xml source, it will show "

What I've tried so far, is

new XAttribute("AttribName", "'")

But that just stores '

If I try

new XAttribute("AttribName", """)

Then it will store "


Your first version is an apostrophe, not a quotation mark. Try this:

new XAttribute("name", "\"");
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜