32 lines
451 B
PowerShell
32 lines
451 B
PowerShell
#[void] remove-variable * | out-null
|
|
|
|
<#
|
|
|
|
[xml]$LISFile = get-content e:\vorlage1.xml
|
|
|
|
#Beispiel:
|
|
$LISFile.tour.tour_date
|
|
|
|
#>
|
|
|
|
$xml = New-Object XML
|
|
$xml.Load("e:\Vorlage3.xml")
|
|
#$xml
|
|
|
|
$oldperson = @($xml.employees.employee)[0]
|
|
$oldperson
|
|
|
|
|
|
|
|
$newperson = $oldperson.Clone()
|
|
$newperson.name = "Cofi"
|
|
$newperson.age = "30"
|
|
$newperson.id = "103"
|
|
|
|
$xml.employees.AppendChild($newperson)
|
|
|
|
write-host "---------------"
|
|
$xml
|
|
|
|
$xml.Save("e:\Vorlage3.xml")
|