Question

Powershell seems to be barfing on an xml file with a unicode BOM - the code:

$xml = [xml]{ get-content $filename }

blows up with 'Data at the root level is invalid'.

Is there an easy way to do this without fiddling around with the contents of the file?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top