' Collection of code snippets by Arne Vajhøj 
' (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
Imports System
Imports System.IO
Imports System.Xml
Imports System.Xml.Xsl

Class MainClass
    Public Shared Sub Main(ByVal args As String())
        Dim doc As XmlDocument = New XmlDocument
        doc.Load("C:\test.xml")
        Dim xslt As XslTransform = New XslTransform
        xslt.Load("C:\test.xsl")
        Dim wrt As XmlTextWriter = New XmlTextWriter(New StreamWriter("C:\test4.xml"))
        wrt.Formatting = Formatting.Indented
        xslt.Transform(doc, Nothing, wrt, Nothing)
    End Sub
End Class 
