<%@ Language=VBScript %>
<%@ Import Namespace="System.Net"%>
<%@ Import Namespace="System"%>
<%@ Import Namespace="System.Collection"%>
<%@ Import Namespace="System.Text"%>
<%@ Import Namespace="System.IO"%>
<%@ Import Namespace="System.Xml"%>
<%@ Import Namespace="System.Xml.Xsl"%>
<%@ Import Namespace="System.Xml.XPath"%>
<Script runat="server">
Function GetWebPageAsStringShort2(strURI)
With WebRequest.Create(New URI(strURI)).GetResponse()
With New StreamReader(.GetResponseStream())
GetWebPageAsStringShort2 = .ReadToEnd()
End With
End With
End Function
Dim sXML as String = GetWebPageAsStringShort2("http://slashdot.org/slashdot.xml")
Dim sXSLT As New XslTransform()
sXSLT.Load(CType(Server.MapPath("slashdot.xsl"), String))
'# Error is on the above line.
Dim mydata As New XPathDocument(sXML)
Dim writer As New XmlTextWriter(Console.Out)
sXSLT.Transform(mydata, Nothing, writer)
</Script>
That is what I got thus far (btw, thank you for the article. I have some book coming from wrox press on this stuff, but I need to know this rather quickly for a job so i'm trying to get a head start.) but it gives me an error:
Compiler Error Message: BC30188: Declaration expected.
at the above referenced line of code.