http://todotnet.com/archive/2005/10/11/2595.aspx
遗憾的是,代码是在C#中。
哪个是vb.net版本的equivelant?
答案 0 :(得分:2)
使用http://www.developerfusion.com/tools/convert/csharp-to-vb/转换
Imports System.Net
Imports System.Xml.Xsl
Imports System.Net
Dim request As HttpWebRequest = DirectCast(HttpWebRequest.Create("...url to the original publish.htm file..."), HttpWebRequest)
Dim response As HttpWebResponse = DirectCast(request.GetResponse(), HttpWebResponse)
Dim dataStream As Stream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
responseFromServer = responseFromServer.Replace(" ", " ")
Dim xml As New System.Xml.XmlDocument()
xml.LoadXml(responseFromServer)
Dim xslt As New XslCompiledTransform()
Dim html As TextWriter = New StringWriter()
xslt.Load(Server.MapPath("CustomPublish.xsl"))
xslt.Transform(xml, Nothing, html)
Response.Write(html.ToString())
Response.[End]()
让我知道它是否有效。
答案 1 :(得分:0)