1
我的XML和PowerShell腳本有點問題。 我需要刪除Vlan
項目的XML文件:根據節點值刪除XML節點
<?xml version="1.0" encoding="utf-8"?>
<Settings>
<ARP>
<ConfigVLAN>
<Vlan>Vlan1</Vlan>
<Vlan>Vlan2</Vlan>
<Vlan>Vlan3</Vlan>
<Vlan>Vlan4$</Vlan>
</ConfigVLAN>
</ARP>
</Settings>
但我不能刪除<Vlan>Vlan4$</Vlan>
與RemoveChild
方法....
$xml.Settings.ARP.configVLAN.SelectSingleNode("Vlan[text()=""$($selectedItem)""]").RemoveChild()
你能幫助我嗎?