Another in a series of example Powershell scripts that may be of use.
As an example, I will use a USGS format for streamflow data, and convert it to a human readable text file (which is here a comma separated file, which could be read into a spreasheet, likw MS Excel). I have an example WaterML file here, but you can visit the USGS site and download your own.
The particular XSLT I have here for download is set up with "Placeholders" for completing the output by showind the query that created the data file. It was set up as a learning exercise for students. You can get an idea of how to complete the XSLT by using the "Write-Console.ps1" script, which does a similar transformation byt sents the output to the screen.
In powershell, all we have to do is "introduce" and XML file and and XSLT file to each other. It is a simple 3-line script. The last line will create a text file
$xslt = New-Object System.Xml.Xsl.XslCompiledTransform; $xslt.load( "WaterML2txt.xslt" ) $xslt.Transform( "WaterML.xml", "WaterML.txt" )