VB.Net Tutorial/XML/XSLT Transform

Материал из VB Эксперт
Перейти к: навигация, поиск

Applying an XSLT style sheet to an XML document

Imports System.Xml.Xsl " contains class XslCompiledTransform
Public Class Tester
    Public Shared Sub Main
      Dim transformer As XslCompiledTransform
      transformer = New XslCompiledTransform() " create transformer
      transformer.Load("YOurFile.xsl") " load and compile the style sheet
      transformer.Transform("YOurFile.xml", "YOurFile.html")
      Console.WriteLine(System.IO.File.ReadAllText("YOurFile.html"))
    End Sub
End Class