Share via


ExportXml Method (CatalogExportOptions, String)

Exports catalogs to the specified file.

Namespace:  Microsoft.CommerceServer.Catalog
Assembly:  Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)

Syntax

'Declaration
Public Function ExportXml ( _
    catalogExportOptions As CatalogExportOptions, _
    fileName As String _
) As ExportProgress
'Usage
Dim instance As CatalogContext
Dim catalogExportOptions As CatalogExportOptions
Dim fileName As String
Dim returnValue As ExportProgress

returnValue = instance.ExportXml(catalogExportOptions, _
    fileName)
public ExportProgress ExportXml(
    CatalogExportOptions catalogExportOptions,
    string fileName
)
public:
ExportProgress^ ExportXml(
    CatalogExportOptions^ catalogExportOptions, 
    String^ fileName
)
public function ExportXml(
    catalogExportOptions : CatalogExportOptions, 
    fileName : String
) : ExportProgress

Parameters

  • fileName
    Type: System..::.String
    The filename. Should not be nullNothingnullptra null reference (Nothing in Visual Basic).

Return Value

Type: Microsoft.CommerceServer.Catalog..::.ExportProgress
An Export Progress object.

Exceptions

Exception Condition
ArgumentNullException

The catalogExportOptions or fileName is nullNothingnullptra null reference (Nothing in Visual Basic).

ArgumentNullException

The fileName is an empty string.

Remarks

Use this method to export catalog data to an XML file. Creates an XML file that contains Catalog information.

Examples

// The ImportXml returns an ImportProgress object
// Use the Status property to determine the current status
ExportProgress exportProgress = this.catalogContext.ExportXml(catalogExportOptions, fileName);
while (exportProgress.Status == CatalogOperationsStatus.InProgress)
{
  System.Threading.Thread.Sleep(3000);
  // Call the refresh method to refresh the current status
  exportProgress.Refresh();
}

Permissions

See Also

Reference

CatalogContext Class

CatalogContext Members

ExportXml Overload

Microsoft.CommerceServer.Catalog Namespace