Export pages to ziped XML format.

Namespace:  EPiServer.Enterprise
Assembly:  EPiServer.Enterprise (in EPiServer.Enterprise.dll) Version: 6.0.530.0

Syntax

C#
public class DataExporter : ExportImportBase, 
	IDisposable

Examples

Example that demonstrates how to export a page to a file
CopyC#
// Create a new exporter 
DataExporter Exporter = new DataExporter();

// Create an output stream
string exportFile = Path.GetTempFileName();
Exporter.Stream = new FileStream(exportFile, FileMode.Create, FileAccess.Write, FileShare.None);

// Add pages to the export package, here alla pages below the startpage
Exporter.SourceRoots.Add(new ExportSource(PageReference.StartPage, 
    ExportSource.RecursiveLevelInfinity));

// Export all pages
Exporter.Export();

// Close the exporter
Exporter.Close();

// Close the out file 
Exporter.Stream.Close();

Inheritance Hierarchy

System..::.Object
  EPiServer.Enterprise..::.ExportImportBase
    EPiServer.Enterprise..::.DataExporter

See Also