|
|
submitted by
hockman
3 months ago
hockblogs.net — 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);
|
|
tags:
VisualStudio | tag it
Everyones tags: | Your tags: | |
|
|
|
Add a live kick counter to your blog >>
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:
Simply copy and paste this HTML into your blog post.
Users who kicked this story:
No comments so far
|