Jump to content
Xtreme .Net Talk

rmurillo

Members
  • Posts

    3
  • Joined

  • Last visited

Personal Information

  • Visual Studio .NET Version
    Visual Studio .Net Enterprise
  • .NET Preferred Language
    VB.Net

rmurillo's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: BC30188: Declaration expected. Source Error: Line 21: Dim sXML as String = GetWebPageAsStringShort2("http://slashdot.org/slashdot.xml") Line 22: Dim sXSLT As New XslTransform() Line 23: sXSLT.Load(CType(Server.MapPath("slashdot.xsl"), String)) Line 24: Dim mydata As New XPathDocument(sXML) Line 25: Dim writer As New XmlTextWriter(Console.Out) Source File: D:\development\test\ASPPage1.aspx Line: 23 Code: <%@ Language="VB" Debug="True" %> <%@ 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)) Dim mydata As New XPathDocument(sXML) Dim writer As New XmlTextWriter(Console.Out) sXSLT.Transform(mydata, Nothing, writer) </Script>
  2. <%@ 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.
  3. RE: XML in VB.Net I'm new to VB.Net and am having some trouble with converting programs from ASP <%@ Language=VBScript %> <%@ Import Namespace="System.Net"%> <%@ Import Namespace="System.IO"%> <%@ Import Namespace="System.Xml"%> <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 doc As XmlDocument = New XmlDocument() </Script> That is as far as I have gotten. The trouble seems to be that I cannot seem to figure out how to remotely get XML data so i can transform it server-side with an XSL document. Any help would be appreciated.
×
×
  • Create New...