Hi I am a
VB.Net Newbie so be patient with me.
I am trying to convert a XML file into a HTML Document using the XSLTransform method. I want to do this in a
VB.Net Windows Application as opposed to a Web Application. I have managed to generate an XML Document using XMLWriter but I get errors when trying to use the XSLTransform.Transform Method.
The current error I have is as follows:
"public sub transform(inputfile as string, outputfile as String) is obsolete: 'You should pass XMLResolver to Transform() method"
My code is:
Public Sub ExportAsHTML()
Try
Dim xmlfilename As String = "c:\new.xml"
Dim xslfilename As String = "c:\transform.xsl"
Dim htmlfilename As String = "c:\new.html"
Dim Transformer As New XslTransform
Transformer.Load("c:\transform.xsl")
Transformer.Transform(xmlfilename, htmlfilename)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Can someone please post an example of a windows application that converts an xml file into a html file using XSLTransform method in
VB.Net.
Any help would be much appreciated.
Cheers