Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $xmlFile = "C:\temp\app.config"
- $xml = [xml] (Get-Content $xmlFile)
- $xml.SelectNodes('//configuration/specFlow') | % {
- $stepAssembly1 = $xml.CreateNode('element','stepAssembly','')
- $stepAssembly2 = $xml.CreateNode('element','stepAssembly','')
- $stepAssembly1.SetAttribute('assembly','Dennis.Speech.Framework')
- $stepAssembly2.SetAttribute('assembly','Dennis.Speech.Core')
- $stepAssemblies = $xml.CreateNode('element','stepAssemblies','')
- $stepAssemblies.AppendChild($stepAssembly1)
- $stepAssemblies.AppendChild($stepAssembly2)
- $_.AppendChild($stepAssemblies)
- }
- $xml.Save($xmlFile)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement