XML C# Book

XSLT stands for Extensible Stylesheet Language Transformations.
It is an XML language that describes how to transform one XML language into another.
Consider the following XML file:


Jim
Bo


The following XSLT file describes such a transformation:











The output is as follows:


Jack


Smith




The System.Xml.Xsl.XslCompiledTransform transform class efficiently performs
XLST transforms. It renders XmlTransform obsolete. XmlTransform works very simply:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Xml;
using System.Xml.Xsl;
using System.Xml.Linq;
using System.Text;
using System.IO;
class Program
{
static void Main()
{
XslCompiledTransform transform = new XslCompiledTransform();
transform.Load("test.xslt");
transform.Transform("input.xml", "output.xml");
}
}