I am trying to write a function within an XML Web Service that transforms an xml file and displays an html file. That is, I use an XslTransfrom Object along with an xsl file to transform an xml file into an html file and then display the html file. There is a lot of ASP.NET sample code out there on how to do this, but it does not work inside a Web Service function. For example, one line of code I got from some sample code is as follows:<BR><BR>Dim writer as XmlTextWriter = new xmlTextWriter(Console.Out)<BR><BR>This generates a compiler error that the name "Console" is not declared. Following a suggestion I received from another post I modified this to read:<BR><BR>Dim writer as XmlTextWriter = new xmlTextWriter(Me.Context.Console.Out)<BR><BR>Now I get an error that "Context" is not a member of my Web Services class. The entire code is below. Any suggestions on how to fix the above problem? Thanks.<BR><BR>Jose Mata<BR><BR>&#060;%@ WebService Language="VB" Class="ManageResumes" %&#062;<BR><BR>Imports System.Web<BR>Imports System.Web.Services<BR>Imports System.Web.UI<BR>Imports System.Xml<BR>Imports System.Xml.Xsl<BR>Imports System.Xml.XPath<BR>Imports System.Console<BR><BR>Public Class ManageResumes<BR><BR> &#060;WebMethod()&#062; _<BR> Public Function displayResume(filename As String) as String<BR> Dim xmlPath as String = "c:
esumes12345.xml"<BR> Dim xslPath as String = "resumeDisplay.xsl"<BR> Dim doc as XPathDocument = new XPathDocument(xmlPath)<BR> Dim transform as XslTransform = new XslTransform()<BR> Dim writer as XmlTextWriter = new xmlTextWriter(Me.Context.Console.Out)<BR> <BR> transform.Load(xslPath)<BR> writer.Formatting = Formatting.Indented<BR> writer.Indentation = 4<BR> <BR> transform.Transform(doc, nothing, writer)<BR> <BR> End Function<BR><BR>End Class