Cleaning up deprecated class System.Xml.Xsl.XslTransform(hockblogs.net)

submitted by hockmanhockman(505) 3 years, 8 months ago

Hi there, I'm currently in between two releases and I decided that is was time for some good-old-clean-up-of-the-code. I've recently looked at the warnings that Visual Studio 2005 generates. And I've found out that I got the following warning: 'System.Xml.Xsl.XslTransform' is obsolete: 'This class has been deprecated. Please use System.Xml.Xsl.XslCompiledTransform instead. On MSDN there's great article on how to migrate this deprecated class from 1.1 to .NET 2.0: http://msdn.microsoft.com/en-us/library/66f54faw(VS.80).aspx This ultimately resulted in my following solution, where url is an url to an XML document and writer is an HtmlTextWriter that will do the rendering: XslCompiledTransform xslt = new XslCompiledTransform(); xslt.Load(Server.MapPath("/xsl/google_results.xslt")); xslt.Transform(new XPathDocument(url), null, writer);

add a comment |category: |Views: 86

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story