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