• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

VB.NET XslTransform.Load方法代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了VB.NET中System.Xml.Xsl.XslTransform.Load方法的典型用法代码示例。如果您正苦于以下问题:VB.NET XslTransform.Load方法的具体用法?VB.NET XslTransform.Load怎么用?VB.NET XslTransform.Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Xml.Xsl.XslTransform的用法示例。



在下文中一共展示了XslTransform.Load方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的VB.NET代码示例。

示例1: TransformFile

public shared sub TransformFile (xsltNav as XPathNavigator) 
 
 ' Load the stylesheet.
 Dim xslt as XslTransform = new XslTransform()
 xslt.Load(xsltNav, nothing, nothing)

 ' Transform the file.
 xslt.Transform("books.xml", "books.html", nothing)
end sub
开发者ID:VB.NET开发者,项目名称:System.Xml.Xsl,代码行数:9,代码来源:XslTransform.Load


示例2: TransformFile

public shared sub TransformFile (xsltReader as XmlReader, secureURL as String) 
 
 ' Load the stylesheet using a default XmlUrlResolver and Evidence 
 ' created using the trusted URL.
 Dim xslt as XslTransform = new XslTransform()
 xslt.Load(xsltReader, new XmlUrlResolver(), XmlSecureResolver.CreateEvidenceForUrl(secureURL))

 ' Transform the file.
 xslt.Transform("books.xml", "books.html", new XmlUrlResolver())
end sub
开发者ID:VB.NET开发者,项目名称:System.Xml.Xsl,代码行数:10,代码来源:XslTransform.Load


示例3: Sample

' 导入命名空间
Imports System.IO
Imports System.Xml
Imports System.Xml.Xsl
Imports System.Xml.XPath

public class Sample

  private const filename as String = "books.xml"
  private const stylesheet as String = "titles.xsl"

  public shared sub Main()

    'Create the reader to load the stylesheet. 
    'Move the reader to the xsl:stylesheet node.
    Dim reader as XmlTextReader = new XmlTextReader(stylesheet)
    reader.Read()
    reader.Read()

    'Create the XslTransform object and load the stylesheet.
    Dim xslt as XslTransform = new XslTransform()
    xslt.Load(reader)

    'Load the file to transform.
    Dim doc as XPathDocument = new XPathDocument(filename)
             
    'Create an XmlTextWriter which outputs to the console.
    Dim writer as XmlTextWriter = new XmlTextWriter(Console.Out)

    'Transform the file and send the output to the console.
    xslt.Transform(doc, nothing, writer)
    writer.Close()  

  end sub
end class
开发者ID:VB.NET开发者,项目名称:System.Xml.Xsl,代码行数:35,代码来源:XslTransform.Load


示例4: Sample

Option Strict
Option Explicit

Imports System.IO
Imports System.Xml
Imports System.Xml.Xsl
Imports System.Xml.XPath

Public Class Sample
    Private Shared filename1 As String = "books.xml"
    Private Shared stylesheet1 As String = "output.xsl"
    
    
    Public Shared Sub Main()
        'Load the stylesheet.
        Dim xslt As New XslTransform()
        xslt.Load(stylesheet1)
        
        'Load the file to transform.
        Dim doc As New XPathDocument(filename1)
        
        'Create an XmlTextWriter which outputs to the console.
        Dim writer As New XmlTextWriter(Console.Out)
        
        'Transform the file and send the output to the console.
        xslt.Transform(doc, Nothing, writer, Nothing)
        writer.Close()
    End Sub
End Class
开发者ID:VB.NET开发者,项目名称:System.Xml.Xsl,代码行数:29,代码来源:XslTransform.Load


示例5: Sample

' 导入命名空间
Imports System.IO
Imports System.Xml
Imports System.Xml.XPath
Imports System.Xml.Xsl
Imports System.Net

public class Sample

   private shared filename as String = "books.xml"
   private shared stylesheet as String = "sort.xsl"

   public shared sub Main()
   
     'Create the XslTransform.
     Dim xslt as XslTransform = new XslTransform()

     'Create a resolver and set the credentials to use.
     Dim resolver as XmlUrlResolver = new XmlUrlResolver()
     resolver.Credentials = CredentialCache.DefaultCredentials

     'Load the stylesheet.
     xslt.Load(stylesheet, resolver)

     'Load the XML data file.
     Dim doc as XPathDocument = new XPathDocument(filename)

     'Create the XmlTextWriter to output to the console.             
     Dim writer as XmlTextWriter = new XmlTextWriter(Console.Out)

     'Transform the file.
     xslt.Transform(doc, nothing, writer, nothing)
     writer.Close()

  end sub
end class
开发者ID:VB.NET开发者,项目名称:System.Xml.Xsl,代码行数:36,代码来源:XslTransform.Load


示例6: SymEnc

' 导入命名空间
Imports System.Xml.Xsl

Public Class SymEnc

    Public Shared Sub Main(ByVal CmdArgs() As String)
        Dim myXslTransform As XslTransform = New XslTransform()
        Dim destFileName As String = "ShowIt.html"
    
        myXslTransform.Load("xsltFile.xslt")
        myXslTransform.Transform("xmlFile.xml", destFileName)
        System.Diagnostics.Process.Start(destFileName)
    End Sub

End Class
开发者ID:VB程序员,项目名称:System.Xml.Xsl,代码行数:15,代码来源:XslTransform.Load



注:本文中的System.Xml.Xsl.XslTransform.Load方法示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
VB.NET DateTime.Subtraction操作符代码示例发布时间:2022-05-24
下一篇:
VB.NET XmlWriter.WriteString方法代码示例发布时间:2022-05-24
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap