AdministrationMetadataCatalog.ImportPackage method (String, String[], PackageContents, String)
Imports the model given in the XML into the Metadata Store using the specified package contents and setting.
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, _
settingId As String _
) As Model
'Usage
Dim instance As AdministrationMetadataCatalog
Dim xml As String
Dim errors As String()
Dim packageContents As PackageContents
Dim settingId As String
Dim returnValue As Model
returnValue = instance.ImportPackage(xml, _
errors, packageContents, settingId)
public Model ImportPackage(
string xml,
out string[] errors,
PackageContents packageContents,
string settingId
)
Parameters
xml
Type: System.StringThe XML string from which to import the metadata model.
errors
Type: []A list of the noncritical errors encountered during the import process.
packageContents
Type: Microsoft.SharePoint.BusinessData.Parser.PackageContentsOptions that specify what to import.
settingId
Type: System.StringThe identifier of the Metadata Store partition in which the properties, localized names and access control entries of the metadata objects will be created.
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