edit xml file using c#,getting error invalid token

蓝咒 提交于 2019-11-29 17:21:30

As suggested by @MatthewStrawbridge in comment, the problem is the prefixes declared pointing to incorrect namespace URL. You don't need to escape forward slashes, so the prefix that point to default namespace should be declared this way :

oManager.AddNamespace("ns", "http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition");

Then your could work just fine to change value of <workshop1> element to "new text". You don't even need to declare the second prefix mapping in the code, because you don't use it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!