AdministrationMetadataCatalog.ExportPackage method (String, PackageContents)

Returns an XML representation of the metadata model.

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

Syntax

'Declaration
Public Function ExportPackage ( _
    modelName As String, _
    packageContents As PackageContents _
) As String
'Usage
Dim instance As AdministrationMetadataCatalog
Dim modelName As String
Dim packageContents As PackageContents
Dim returnValue As String

returnValue = instance.ExportPackage(modelName, _
    packageContents)
public string ExportPackage(
    string modelName,
    PackageContents packageContents
)

Parameters

Return value

Type: System.String
The XML representation of the metadata model.

Exceptions

Exception Condition
ArgumentException

The modelName parameter is a null reference (Nothing in Visual Basic) or empty, or the packageContents parameter has PackageContents.InlineProxies set and PackageContents.Model unset.

Remarks

If packageContents is set to PackageContents.Model, the method returns an XML representation of all the metadata object contained in the metadata model, along with their properties, localized names and access control entries. Otherwise, the method returns an XML representation of only the localized names, properties, and access control entries that correspond to the metadata objects in the model.

See also

Reference

AdministrationMetadataCatalog class

AdministrationMetadataCatalog members

ExportPackage overload

Microsoft.SharePoint.BusinessData.Administration namespace