mirror of
https://github.com/Micke-K/IntuneManagement.git
synced 2026-09-28 10:55:38 +02:00
3.10.1.12
Issue 380 - XML formatting
This commit is contained in:
@@ -2765,15 +2765,15 @@ function Update-XmlFormatting {
|
||||
)
|
||||
process {
|
||||
|
||||
$Xml = $Xml -replace "`r`n", "`n"
|
||||
|
||||
$Xml = $Xml -replace '<([^\s/>]+)([^>]*)\s/>' , '<$1$2/>'
|
||||
|
||||
$Xml = ($Xml -split "`n") |
|
||||
$Xml = ($Xml -split "`r?`n") |
|
||||
Where-Object { $_.Trim().Length -gt 0 } |
|
||||
ForEach-Object { $_ } |
|
||||
Out-String
|
||||
|
||||
$Xml = $Xml -replace "`r`n", "`n"
|
||||
|
||||
return $Xml.Trim()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user