Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
can we use XslTransform for .NET 3.5 as XSLCompiledTransform is taking lots of time to compile the whole XSL StyleSheet. It is taking almost all the memory.
Posted

1 solution

Hello,

Yes you can.

http://msdn.microsoft.com/en-us/library/system.xml.xsl.xsltransform(v=vs.90).aspx[^]


XslTransform xslt = new XslTransform();
xslt.Load("http://server/favorite.xsl");
XPathDocument mydata = new XPathDocument("inputdata.xml");
XmlWriter writer = new XmlTextWriter(Console.Out);
xslt.Transform(mydata,null,writer, null);



Valery.
 
Share this answer
 
Comments
RajaSekhar Korimilli 20-Jun-14 0:13am    
But this Class has been deprecated from .NET Framework 2.0 to 3.5. Can we still use it?
Valery Possoz 20-Jun-14 14:29pm    
Yes you can use it. It is "marked" as deprecated but it is still there... actually it is still there in .net 4.5

Extract form the Microsoft documentation:
The .NET Framework and the common language runtime strive to support backward compatibility (allowing applications that were developed with one version of the .NET Framework to run on the next version of the .NET Framework). This makes it difficult to simply remove a type or a type member. Instead, the .NET Framework indicates that a type or a type member should no longer be used by marking it as obsolete or deprecated. Deprecating a type or a member involves marking it so that developers are aware it will go away and have time to respond to its removal. However, existing code that uses the type or member continues to run in the new version of the .NET Framework.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900