本文整理汇总了VB.NET中System.Xml.Xsl.XsltMessageEncounteredEventArgs类的典型用法代码示例。如果您正苦于以下问题:VB.NET XsltMessageEncounteredEventArgs类的具体用法?VB.NET XsltMessageEncounteredEventArgs怎么用?VB.NET XsltMessageEncounteredEventArgs使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了XsltMessageEncounteredEventArgs类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: Main
' 导入命名空间
Imports System.IO
Imports System.Xml
Imports System.Xml.Xsl
Imports System.Xml.XPath
Public Class Sample
Public Shared Sub Main()
' Create the XslCompiledTransform object and load the style sheet.
Dim xslt As New XslCompiledTransform()
xslt.Load("message.xsl")
Dim argList As New XsltArgumentList()
AddHandler argList.XsltMessageEncountered, AddressOf MessageCallBack
' Load the file to transform.
Dim doc As New XPathDocument("books.xml")
' Transform the file.
xslt.Transform(doc, argList, XmlWriter.Create("output.xml"))
End Sub
Private Shared Sub MessageCallBack(ByVal sender As Object, ByVal e As XsltMessageEncounteredEventArgs)
Console.WriteLine("Message received: {0}", e.Message)
End Sub
End Class