Created
March 6, 2015 01:45
-
-
Save bradymholt/8e4402cddf0c50e4a3d5 to your computer and use it in GitHub Desktop.
Applies XSLT to XML and outputs HTML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| param ($xml, $xsl, $output) | |
| if (-not $xml -or -not $xsl -or -not $output) | |
| { | |
| Write-Host "& .\xslt.ps1 [-xml] xml-input [-xsl] xsl-input [-output] transform-output" | |
| exit; | |
| } | |
| trap [Exception] | |
| { | |
| Write-Host $_.Exception; | |
| } | |
| $xslt = New-Object System.Xml.Xsl.XslCompiledTransform; | |
| $xslt.Load($xsl); | |
| $xslt.Transform($xml, $output); | |
| Write-Host "generated" $output; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment