Partilhar via


AdministrationMetadataCatalog.ImportPackage Method (String, String , PackageContents)

Imports the model given in the XML into the Metadata Store.

Namespace:  Microsoft.SharePoint.BusinessData.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Function ImportPackage ( _
    xml As String, _
    <OutAttribute> ByRef errors As String(), _
    packageContents As PackageContents _
) As Model
'Usage
Dim instance As AdministrationMetadataCatalog
Dim xml As String
Dim errors As String()
Dim packageContents As PackageContents
Dim returnValue As Model

returnValue = instance.ImportPackage(xml, _
    errors, packageContents)
public Model ImportPackage(
    string xml,
    out string[] errors,
    PackageContents packageContents
)

Parameters

  • xml
    Type: System.String

    The XML string from which to import the metadata model.

  • errors
    Type: []

    A list of the noncritical errors encountered during the import process.

Return Value

Type: Microsoft.SharePoint.BusinessData.Administration.Model
The imported model.

Exceptions

Exception Condition
ArgumentNullException

The xml parameter is a null reference (Nothing in Visual Basic).

PackageFormatException

The format of the metadata XML is invalid.

See Also

Reference

AdministrationMetadataCatalog Class

AdministrationMetadataCatalog Members

ImportPackage Overload

Microsoft.SharePoint.BusinessData.Administration Namespace