小编Raj*_*Raj的帖子

在 C# 中替换 xml 元素值

这是我的 xml 文件数据

<Persons>
    <Person>
        <Name>john</Name>
    </Person>
    <Employee>
        <Detail>
            <Firstname>john</FirstName>
        </Detail>
    </Employee>
    <Student>
        <FullName>john</FullName>
    </Student>
</Persons>
Run Code Online (Sandbox Code Playgroud)

我想在所有地方将“john”替换为“danny”。

我怎样才能在 c# 中做到这一点?

c# xml linq-to-entities xmldocument xml-parsing

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

c# ×1

linq-to-entities ×1

xml ×1

xml-parsing ×1

xmldocument ×1