Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
- catalogExportOptions
Type: Microsoft.CommerceServer.Catalog..::.CatalogExportOptions
The catalog export options. Should not be nullNothingnullptra null reference (Nothing in Visual Basic).
- 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.