How to remove a part of outerxml of a node of an xml document
my xml this:
<?xml version="1.0"?>
<test.new.setting>
<settings>
<setting
id = "1"
line1="true"
line2="false"
line3="blah">
</setting>
</settings>
</test.new.setting>
i want remove: line2="false"
is there way powershell?
your xmll looks this:
<?xml version="1.0"?> <test.new.setting> <settings> <setting id="1" line1="true" line2="false" line3="blah"> </setting> </settings> </test.new.setting>
you can attributes of "setting" , remove 1 needed.
$node=selectsinglenode('//setting[@id=""])
$node.attributes
$node.removeattribute('line1')
$node
\_(ツ)_/
Windows Server > Windows PowerShell
Comments
Post a Comment