我该如何将节点的值
<Test>Test</Test>
更改为
<Test>Power</Test>
?
示例:
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="DeploymentDate" value="test" />
<add key="DateOfInitialization" value="Vinoj" />
</appSettings>
<Test>Test</Test>
</configuration>
这是我目前使用的PowerShell脚本:
$configuration = "app.config"
[xml]$xml = New-Object XML
$xml.Load($configuration)
$xml.selectnodes("/configuration/Test") = {"UST"}
$xml.Save($configuration)