문제

I need to save the result of the instance of XslCompiledTransform after the call of load method how can I do that?

도움이 되었습니까?

해결책

Just use System.Web.Caching (it works OK outside of ASP.NET!):

http://www.hanselman.com/blog/UsingTheASPNETCacheOutsideOfASPNET.aspx

다른 팁

Save to Application scope variable:

XslCompiledTransform xslt = new XslCompiledTransform();
xslt.Load("style.xsl");
Application["CompiledTransform"] = xslt;

use somewhere else later:

XslCompiledTransform xs = Application["CompiledTransform"] as XslCompiledTransform;
xs.Transform("input.xml", "output.xml");
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top