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.
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.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.
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