The minuscule feature is that you can actually convert the data directly to the XmlDocument DOM or to the LINQ-to-XML XElement or XDocument (via the CreateWriter() method) without having to go through the text form, getting an XmlWriter instance to feed the data.
Assuming your XML input is IXPathNavigable and that you downloaded an XslCompiledTransform instance, you can do the following:
XmlDocument target = new XmlDocument(input.CreateNavigator().NameTable); using (XmlWriter writer = target.CreateNavigator().AppendChild()) { transform.Transform(input, writer); }
Then you converted the document into a taget document. Note that there are other overloads on transform so that you can pass XSLT arguments and extensions to the stylesheet.
If you want, you can write your own static helper or extension method to perform the conversion as needed. However, it might be a good idea to cache the conversion, since downloading and compiling are not free.
source share