how escape " ' in dom

ziyunxiao 2006-01-12 07:16:39
I use code like these generate xml.

xmlNode.innerText = @"&<>'\"";
dom.Save(filename)


I found that <,>,& have changed to <>& But ",' has left no change.

I want to keep them all changed or no one changed so I can escape them myself.

How to do that? change all or not change any one?

...全文
80 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
孟子E章 2006-01-13
  • 打赏
  • 举报
回复
' '
" "
ziyunxiao 2006-01-13
  • 打赏
  • 举报
回复
I must keep them all changed, I can not leave ' " not change. Because customer specification need changed them all.

I mean I want to changed them all or no one change then I can change them myself.

jiezhi 2006-01-12
  • 打赏
  • 举报
回复
,不会给你带来什么影响的。
alanzhou 2006-01-12
  • 打赏
  • 举报
回复
If you use DOM, you do not need escaping them.

110,571

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧