.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan
Santhakumar Munuswamy
Asad Ali
Fauzul Azmi
Post New Web Links

xslCompiledTransform

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :ASP.Net
 

Hi guys

Having some trouble with XSL.

I have some code, taking data from a web form and creating an xml document.

I'm trying to use xslCompiledTransform method to write the link to XSL file into the XML document.

At the moment I'm doing this locally, so it is paths to files on disc - but when I execute the code, I receive the error : "The 'http://www.w3.org/TR/WD-xsl' namespace is no longer supported."

 Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
        ' Create a new file in C:\\ dir
        Dim textWriter As XmlTextWriter = New XmlTextWriter("C:\\one.xml", Nothing)
        Dim style As String = ("C:\test.xsl")
        Dim transformer As New System.Xml.Xsl.XslCompiledTransform
        ' Opens the document
        textWriter.WriteStartDocument()
        transformer.Load(style)
         ' Write first element
        textWriter.WriteStartElement("CustomerQuote")
        'element
        textWriter.WriteStartElement("QuoteNo")
        textWriter.WriteString(txtQuote.Text)
        textWriter.WriteEndElement()
        ' Write next element
        textWriter.WriteStartElement("Date")
        textWriter.WriteString(txtDate.Text)
        textWriter.WriteEndElem


View Complete Post


More Related Resource Links

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend