Application.SaveToXml Method
Saves the XML definition of a package to a file.
Namespace: Microsoft.SqlServer.Dts.Runtime
Assembly: Microsoft.SqlServer.ManagedDTS (in Microsoft.SqlServer.ManagedDTS.dll)
Parameters
- fileName
- Type: System.String
The name of the file to save.
- package
- Type: Microsoft.SqlServer.Dts.Runtime.Package
The package object to save.
- events
- Type: Microsoft.SqlServer.Dts.Runtime.IDTSEvents
An IDTSEvents object.
The following example saves the .dtsx package in XML format with the name myXMLPackage.dtsx.
static void Main(string[] args) { // The variable pkg points to the location // of the ExecuteProcess package sample // that is installed with the SSIS samples. string pkg = @"C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx"; Application app = new Application(); Package p = app.LoadPackage(pkg, null); app.SaveToXml("myXMLPackage.dtsx", p, null); }