I am trying to use XslCompiledTransform in the .NET class library in order to transform an xml string to an Html string. Please consider that I want to use normal strings, not files.
How ca I do this?
It seems that XslCompiledTransform only works with files…
Load()also acceptsXmlReader, andTransform()accepts most combinations ofXmlReaderinput, andXmlWriter,TextWriterandStreamas output.So most typically, you might use a
StringWriterfor the output, and aXmlReadercreated from aStringReaderfor the input.Full example, no files: