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 in the specified partition, and merges its properties, localized names, and access control entries into the current TypeDescriptor in the metadata store.
Namespace: Microsoft.SharePoint.BusinessData.Administration.Client
Assembly: Microsoft.SharePoint.BusinessData.Administration.Client (in Microsoft.SharePoint.BusinessData.Administration.Client.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
xml
Type: System.StringThe XML metadata to merge.
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.
packageContents
Type: Microsoft.SharePoint.BusinessData.Administration.Client.Parser.PackageContentsA bitwise combination of the enumeration values that specify which elements to read.
parameter
Type: Microsoft.SharePoint.BusinessData.Administration.Client.ParameterThe parent parameter in which the TypeDescriptor is defined.
parent
Type: Microsoft.SharePoint.BusinessData.Administration.Client.TypeDescriptorThe parent type descriptor within which the TypeDescriptor is defined.
settingId
Type: System.StringThe 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.Client.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
Microsoft.SharePoint.BusinessData.Administration.Client Namespace