Read command line input and do the xml xsl translation : XML Transform « XML « C# / C Sharp






Read command line input and do the xml xsl translation

  
using System;
using System.Xml.Xsl;

public class Transform {
  public static void Main(string [] args) {
    string source = args[0];
    string stylesheet = args[1];
    string destination = args[2];

    XslTransform transform = new XslTransform();
    transform.Load(stylesheet);
    // for .NET v 1.0
    //transform.Transform(source, destination);
    // for .NET v 1.1
    transform.Transform(source, destination, null);
  }
}


           
         
    
  








Related examples in the same category

1.Use XslCompiledTransform
2.Perform an XSL Transform
3.Illustrates the XslTransform classIllustrates the XslTransform class
4.XML transformation: transform XML file to HTML file
5.Perform an XSL Transformation using XML and XSL content and with some XSLT arguments
6.Xslt Transformation Helper