How can I load XSLT file from string in ASP.NET Core?
In full .NET Framework I can use:
XslCompiledTransform objXSLTransform = new XslCompiledTransform();
objXSLTransform.Load(strXSLTFile);
The XslTransform class is obsolete in . NET Framework version 2.0. The XslCompiledTransform class is a new implementation of the XSLT engine.
XSL (eXtensible Stylesheet Language) is a styling language for XML. XSLT stands for XSL Transformations. This tutorial will teach you how to use XSLT to transform XML documents into other formats (like transforming XML into HTML).
XSL Transformation (XSLT)XSLT is designed to be used as part of XSL. In addition to XSLT, XSL includes an XML vocabulary for specifying formatting. XSL specifies the styling of an XML document by using XSLT to describe how the document is transformed into another XML document that uses the formatting vocabulary.
As I mentioned here in details, you need to upgrade your .NET Core 1.x
app to .NET Core 2.0
, because .NET Core 2.0
implements .NET Standard 2.0
, which has System.Xml.Xsl
namespace supported again. And you will be able to use XslCompiledTransform
again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With