XSLT Processing with .NET
The System.Xml.Xsl namespace houses .NET's XSLT processor: the XslTransform class. This class is responsible for performing, with the assistance of other utility classes, XSLT-compliant parsing. To understand its capabilities, it is probably best to jump right in and see it in action.
Loading a Style Sheet
If you think back to the high-level view of the XSLT transformation process, you can easily see the steps that we will have to take to perform such a transform programmatically. We will want to specify a style sheet to use for the transform. We will also want to specify the source document. The XslTransform class handles both tasks.
We need to first instantiate an instance of the class:
Dim xslt As New XslTransform() ...
Get Visual Basic® Programmer's Guide to the .NET Framework Class Library now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.