The .NET framework provides a very useful XslTransform class that can be used for transformations. The Class allows the output to behave in many ways. It can be output to the console, saved to a new file, or added to a new text stream.
The XslTransform class includes the Load() and Transform() methods that let you read both a style sheet and a source document, and then transform the source document by applying the style sheet to it. For example, you can load a style sheet directly by writing
After your style sheet has been loaded in the xslDoc object, you can apply the transformation by writing
xslDoc.Transform(XMLDoc, Nothing, objXMLString)
The best way to see how this works in practice ...