【发布时间】:2022-06-10 18:04:40
【问题描述】:
我的xml示例如下。
<?xml version="1.0" encoding="utf-8"?>
<settingsConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="SettingsConfig.xsd">
<!-- config sources -->
<categories>
<!-- general config -->
<category name="general" source="xml">
<settings>
<setting name="SwVersion" type="System.String" encrypted="false" readonly="true" scope="application"
description="The version number will be shown in splash screen\ settings">5.0</setting>
<setting name="BuildVersion" type="System.String" encrypted="false" readonly="true" scope="application"
description="This version number is the device software build version">5.1.0.snapshot</setting>
</settings>
</category>
</categories>
</settingsConfiguration>
我需要更改的值
<setting name="BuildVersion" type="System.String" encrypted="false" readonly="true" scope="application"
description="This version number is the device software build version">5.1.0.snapshot</setting>
使用 Windows 批处理脚本或 Powershell 从 5.1.0.snapshot 到 6.x.x。
任何帮助将不胜感激。
【问题讨论】:
-
向我们展示您的尝试,以便我们帮助您编写代码。
标签: xml powershell xml-parsing