Sunday, March 6, 2016

Powershell change value inside XML file

[System.Xml.XmlDocument]$file = new-object System.Xml.XmlDocument
$file.load("D:\baba\Launcher.en-US.resx")
$xml_peoples= $file.SelectNodes("/root/data[@name='CompanyName']")
foreach ($person in $xml_peoples) {
   $person.value="baba"
   }
   $file.Save("D:\baba\Launcher.en-US.resx")

No comments:

Post a Comment

Thanks for showing interest in tech-jockey.

Content of this blog has been moved to GITHUB

Looking at current trends and to make my content more reachable to people, I am moving all the content of my blog https://tech-jockey.blogsp...