Dim resolver As New XmlUrlResolver
Dim xsltrans As New XslCompiledTransform
Dim oXml As New XmlDocument
Dim oWriter As XmlWriter
Dim strXML As String = "Your XML string here"
Dim strWriter As String = "C:\DespatchNotePrinting\Results.html"
oXml.LoadXml(strXML)
oWriter = XmlWriter.Create(strWriter)
resolver.Credentials = System.Net.CredentialCache.DefaultCredentials
xsltrans.Load("C:\DespatchNotePrinting\NextDespatch.xslt", Nothing, resolver)
xsltrans.Transform(oXml, oWriter) ', resolver)
|