Sdílet prostřednictvím


ImportXml Method (CatalogImportOptions, Stream)

Imports a stream on the server.

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

Syntax

'Declaration
Public Function ImportXml ( _
    catalogImportOptions As CatalogImportOptions, _
    importStream As Stream _
) As ImportProgress
'Usage
Dim instance As CatalogContext
Dim catalogImportOptions As CatalogImportOptions
Dim importStream As Stream
Dim returnValue As ImportProgress

returnValue = instance.ImportXml(catalogImportOptions, _
    importStream)
public ImportProgress ImportXml(
    CatalogImportOptions catalogImportOptions,
    Stream importStream
)
public:
ImportProgress^ ImportXml(
    CatalogImportOptions^ catalogImportOptions, 
    Stream^ importStream
)
public function ImportXml(
    catalogImportOptions : CatalogImportOptions, 
    importStream : Stream
) : ImportProgress

Parameters

Return Value

Type: Microsoft.CommerceServer.Catalog..::.ImportProgress
An ImportProgress class containing the progress of the import operation.

Exceptions

Exception Condition
ArgumentNullException

The importStream or the catalogImportOptions is nullNothingnullptra null reference (Nothing in Visual Basic).

NotSupportedException

The stream does not support seeking and cannot be imported.

Remarks

Use this method to import an XML stream as catalog data.

Importing an XML document with any identifying properties having their length in excess of 256 characters is allowed. However creating a product in such a catalog with the ProductId greater than 256 characters will throw an exception.

Permissions

See Also

Reference

CatalogContext Class

CatalogContext Members

ImportXml Overload

Microsoft.CommerceServer.Catalog Namespace