编辑元素属性名称和值 [英] Edit element attribute name and value

查看:64
本文介绍了编辑元素属性名称和值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有xml文件,我想更改元素属性名称和值
请迅速需要它

i have xml file and i want to change element attribute name and value
please need that quickly

推荐答案

您好,

使用流读取器读取xml文件,然后使用String.Replace方法将前一个属性替换为新属性.

供您参考:
http://stackoverflow.com/questions/2868489/c-sharp- stream-reader-adding-n-to-xml [ ^ ]

最好的问候,
爱德华
Hi,

Use a streamreader to read your xml file then use the String.Replace method to replace the previous attribute with the new one.

For your reference:
http://stackoverflow.com/questions/2868489/c-sharp-stream-reader-adding-n-to-xml[^]

Best regards,
Eduard


这篇关于编辑元素属性名称和值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆