Thanks for the comments.
I transformed it in a
vb.net project using the following code;
Dim xmlToTransform As New Xml.XmlDocument
Dim XSLTransform As New Xml.Xsl.XslTransform
Dim transformedXML As New Xml.XmlDocument
Dim XSLfilepath As String
XSLfilepath = XSLFileTextBox.Text
Dim sw As New StringWriter
xmlToTransform.Load(XMLFileTextBox.Text)
XSLTransform.Load(XSLfilepath)
XSLTransform.Transform(xmlToTransform, Nothing, sw, Nothing)
My XSL is declared as follows:
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:scripts="urn:my-scripts" exclude-result-prefixes="msxsl scripts">
I specified encoding="utf-8" in my XML and XSL. Why does it return encoding="utf-16" when it is transformed?
The error I get when trying to open the new XML in IE is:
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
---------------------------------------------------------------------
Switch from current encoding to specified encoding not supported. Error processing resource