Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Load XSLT in Asp.Net Core

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); 
like image 882
mskuratowski Avatar asked Apr 11 '17 07:04

mskuratowski


People also ask

Is XSLT obsolete?

The XslTransform class is obsolete in . NET Framework version 2.0. The XslCompiledTransform class is a new implementation of the XSLT engine.

What is XSLT in asp net?

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).

Is xsl and XSLT the same?

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.


1 Answers

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.

like image 138
Dmitry Pavlov Avatar answered Sep 18 '22 18:09

Dmitry Pavlov