I am trying to create an XSLT Transform but keep getting the same problem.
Overload resolution failed because no accessible 'Transform' can be called
with these arguments.
I create a reference to System.Xml.dll
Here is the code
Imports System.Xml
Imports System.Xml.Xsl.XslTransform
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim xslt As New System.Xml.Xsl.XslTransform()
xslt.Load("transform.xslt")
** xslt.Transform("input.xml", "output.htm", Nothing)
End Sub
End Class
The line with double asterisks is where the problem resides.
Alternatively, I have tried this:
Dim myXslTransform As Xml.Xsl.XslTransform = New Xml.Xsl.XslTransform()
Dim myResolver = New XmlUrlResolver()
myResolver.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim destFileName As String = "ShowIt.html"
myXslTransform.Load("WXDisplayThatPuppy.xslt")
**myXslTransform.Transform("OneWXClientMultiPrescr iptions.xml",
destFileName,myResolver)
System.Diagnostics.Process.Start(destFileName)
Again, it seems the Transform methos is where the problem stems from.
Anyone have any idea?