LobSystem.MergeXml method (String, String[], PackageContents, AdministrationMetadataCatalog)
NOTE: This API is now obsolete.
Reads the external system definition from the specified resource XML for the specified Metadata Store, and then merges its properties, localized names, and access control entries with the existing external system in the Metadata Store.
Namespace: Microsoft.SharePoint.BusinessData.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
<ObsoleteAttribute("Use overload with settingId")> _
Public Shared Function MergeXml ( _
xml As String, _
<OutAttribute> ByRef errors As String(), _
packageContents As PackageContents, _
metadataCatalog As AdministrationMetadataCatalog _
) As LobSystem
'Usage
Dim xml As String
Dim errors As String()
Dim packageContents As PackageContents
Dim metadataCatalog As AdministrationMetadataCatalog
Dim returnValue As LobSystem
returnValue = LobSystem.MergeXml(xml, _
errors, packageContents, metadataCatalog)
[ObsoleteAttribute("Use overload with settingId")]
public static LobSystem MergeXml(
string xml,
out string[] errors,
PackageContents packageContents,
AdministrationMetadataCatalog metadataCatalog
)
Parameters
xml
Type: System.StringA string containing the metadata XML.
errors
Type: []A list of noncritical errors that occurred when merging data or reading the XML.
packageContents
Type: Microsoft.SharePoint.BusinessData.Parser.PackageContentsOptions that specify which elements to read.
metadataCatalog
Type: Microsoft.SharePoint.BusinessData.Administration.AdministrationMetadataCatalogThe Metadata Store in which the external system is defined.
Return value
Type: Microsoft.SharePoint.BusinessData.Administration.LobSystem
The merged external system.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The xml or the metadataCatalog parameter is a null reference (Nothing in Visual Basic). |
ArgumentException | The packageContents parameter has the PackageContents.Model value set. |
MetadataObjectNotFoundException | The external system does not exist in the specified Metadata Store. |
Remarks
This method allows you to specify which resources that are present in the given metadata XML string are to be added to the Metadata Store via the packageContents parameter.
If the PackageContents.Properties value is specified in the packageContents parameter, BDC will create all the properties in the given XML in the specified setting. If a property with the same name exists, it will be replaced by the new property. Merging properties requires “Edit” permissions in the specified setting.
If PackageContents.LocalizedNames value is specified in the packageContents parameter, BDC will create all the localized names in the given XML in the specified setting. If a localized name with the same LCID exists, it will be replaced by the new localized name. Merging localized names requires “Edit” permissions in the specified setting.
If PackageContents.Permissions value is specified in the packageContents, BDC will replace existing permissions with the new permissions in the given XML. Merging permissions requires the “SetPermissions” permission in the specified setting.