TypeDescriptor.MergeXml method (String, String[], PackageContents, Parameter, TypeDescriptor, String)

Reads the TypeDescriptor definition information from the specified XML resource for the specified parent type descriptor object, and merges its properties, localized names, and access control entries into the current TypeDescriptor.

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

Syntax

'Declaration
Public Shared Function MergeXml ( _
    xml As String, _
    <OutAttribute> ByRef errors As String(), _
    packageContents As PackageContents, _
    parameter As Parameter, _
    parent As TypeDescriptor, _
    settingId As String _
) As TypeDescriptor
'Usage
Dim xml As String
Dim errors As String()
Dim packageContents As PackageContents
Dim parameter As Parameter
Dim parent As TypeDescriptor
Dim settingId As String
Dim returnValue As TypeDescriptor

returnValue = TypeDescriptor.MergeXml(xml, _
    errors, packageContents, parameter, _
    parent, settingId)
public static TypeDescriptor MergeXml(
    string xml,
    out string[] errors,
    PackageContents packageContents,
    Parameter parameter,
    TypeDescriptor parent,
    string settingId
)

Parameters

  • errors
    Type: []

    When this method returns, contains a list of noncritical errors that occurred when merging data or reading the XML. This parameter is passed uninitialized.

  • settingId
    Type: System.String

    The identifier (ID) of a partition in the metadata store where the properties, localized names, and access control entries are stored; null indicates default settings.

Return value

Type: Microsoft.SharePoint.BusinessData.Administration.TypeDescriptor
The merged TypeDescriptor.

Exceptions

Exception Condition
ArgumentNullException

xml or parameter is null .

ArgumentException

The value of the packageContents parameter is PackageContents.Model.

Remarks

Use the packageContents parameter to specify which resources in the xml parameter are merged with the existing TypeDescriptor.

If the value of the packageContents parameter is PackageContents.Properties, BDC merges all of the properties in the xml parameter. If a property with the same name exists, its value is replaced by the value of the new property. Merging properties requires Edit permissions in the specified setting.

If the value of the packageContents parameter is PackageContents.LocalizedNames, BDC creates all of the localized names in the xml parameter in the specified setting. If a localized name with the same LCID exists, it is replaced by the new localized name. Merging localized names requires Edit permissions in the specified setting.

If the value of the packageContents parameter is PackageContents.Permissions, BDC replaces the existing permissions with the new permissions in the xml parameter. Merging permissions requires the SetPermissions permission in the specified setting.

See also

Reference

TypeDescriptor class

TypeDescriptor members

MergeXml overload

Microsoft.SharePoint.BusinessData.Administration namespace