Visual Studio 2010 and .NET Framework 4 Release Candidate

The Visual Studio 2010 and .NET Framework 4 Release Candidate is available to MSDN subscribers on Monday, February 8th, with general availability on February 10th. Visual Studio 2010 is an integrated development environment that simplifies the entire development lifecycle, from design to deployment.

Url:
http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx

Advertisements

XSLT Transformations with the XslTransform Class (C#)

You can use the XslTransform class to transform XML data using an Extensible Stylesheet Language for Transformations (XSLT) style sheet. XslTransform supports the XSLT 1.0 syntax. The XSLT style sheet must use the namespace http://www.w3.org/1999/XSL/Transform.
 
The following code example loads an XSLT style sheet, reads a file called mydata.xml into an XPathDocument, and performs a transformation on the data on a fictitious file called myStyleSheet.xsl, sending the formatted output to the console.
 
using System;
using System.IO;
using System.Xml;
using System.Xml.XPath;
using System.Xml.Xsl;
public class Sample
{
    private const String filename = "mydata.xml";
    private const String stylesheet = "myStyleSheet.xsl";
    public static void Main()
    {
    XslTransform xslt = new XslTransform();
    xslt.Load(stylesheet);
    XPathDocument xpathdocument = new
    XPathDocument(filename);
    XmlTextWriter writer = new XmlTextWriter(Console.Out);
    writer.Formatting=Formatting.Indented;
    xslt.Transform(xpathdocument, null, writer, null);   
    }
}