【发布时间】:2013-11-28 08:41:23
【问题描述】:
假设我有这个 xml 文件
<section name="AAA">
<Item1>FALSE</Item1>
<Item2>FALSE</Item2>
<Item3>FALSE</Item3>
</section>
<section name="BBB">
<Item1>FALSE</Item1>
<Item2>FALSE</Item2>
<Item3>FALSE</Item3>
</section>
如何使用 PowerShell 更新特定值(使用 XPath 是正确的方法?)
意思是更新section name="BBB"下的Item2
【问题讨论】:
-
想要的输出是什么?
-
+1 用于使用 XSLT 而不是正则表达式。检查这个:hanselman.com/blog/XSLTWithPowershell.aspx
标签: xml powershell xpath