ReplaceReferenceIdentifiers(String, StringDictionary):String

Replaces references to data objects or binary objects.

By means of this method, references to data objects or binary data can be replaced with other references.

To do this, the Xml for which the references are to be replaced is transferred to the method. The root element contains the name of the schema the Xml follows. Based on the schema, the elements and attributes are now searched for which have been defined as xlink:objectReference or xlink:binaryReference. Based on the references found, a key with the reference is now searched for in the transferred dictionary. If a suitable key is found, the associated value is set in the dictionary in the Xml.

If no key with the reference found is present in the dictionary, then an exception of the type System.Exception is triggered with the message "No mapping found for value "value". The placeholder "value" is the reference that was found in the Xml but is not present in the dictionary.

The method supplies the revised Xml as the result.

Return type: System.String

Parameter

xmlData

Type: System.String

This parameter is the Xml to be revised.

mapping

Type: System.Collections.Specialized.StringDictionary

This parameter is a complete dictionary with all references currently present in the Xml and their replacements.

This dictionary must contain all references currently present in the Xml. The references that are not to be replaced must therefore be indicated nevertheless. The key and the associated value in the dictionary is the same reference in this case.