DC 5.7 Metadata Configuration

Xml2Metadata parser

If using theĀ Xml2MetadataĀ parser metadata must be preconfigured.

Here is an example of a Xml2Metadata configuration file:

<Settings>
Ā Ā Ā Ā <MetafieldĀ Id="5EB3EEFC-A043-410F-89B0-29ED3EF37078"Ā XPath="/Media/Title"Ā />
Ā Ā Ā Ā <MetafieldĀ Id="50182"Ā XPath="/Media/Description"Ā />
Ā Ā Ā Ā <MetafieldĀ Id="50188"Ā XPath="/Media/MMMenu"Ā />
</Settings>

TheĀ SettingsĀ element is required. It holds theĀ MetafieldĀ elements, which couples the metafields in your metadata files to the metafields in the DC.

Metafield attribute
Description
IdThe metafield ID or GUID as seen in the DC under theIDĀ orĀ GUIDcolumn respectively. One special tag can also be used:Ā ItemID. When this is set an ItemId can be specified to skip the match search and set metadata on this ItemId directly.
XPathThe XPath selector for this metafield in the metadata XML files.
ComboSeparatorOverride the ComboSeparator from the import configuration for a specific metafield. For future use (xml metadata does not support multivalues in same string input).
ComboMatchStyleOverride the ComboMatchStyle from the import configuration for a specific metafield. Possible values: TextValue (default) or OptionValue.

Excel parser

With Excel metadata the configuration is part of the sheet. The MetafieldIdRow config specifies which row to find it. All other rows until DataStartRow are ignored. Make sure to be aware of ComboMatchStyle - it is set in the import configuration. If it is not explicitly set it defaults to the textvalue. ComboSeparator defaults to ; (semicolon). Even though the configs are called combo... they are in effect also for tree type metafields.

The simplest configuration is just metafield ID set. Let's say we need to update a MultiComboValue with ID 50521. That might look like this:

Overriding ComboSeparator and/or ComboMatchStyle

Lets say an import configuration holds this default configuration (equivalent to not having these configs specifed at all):

<ComboSeparator>;</ComboSeparator>
<ComboMatchStyle>TextValue</ComboMatchStyle>

Now the metafield row accepts a simple notation like this: Metafield-ID ComboSeparator ComboMatchStyle.

In this example we tell the importer this is Metafield 50521, the combo separator is , (comma) and we want to match against the optionvalue.

It's important that there is a space in between the values. It's not necessary to specify ComboMatchStyle if the default is preferred but it is necessary to set ComboSeparator if in need of setting ComboMatchStyle. So:

  • "50521 ," is equivalent to "50521 , TextValue" when TextValue is the default ComboMatchStyle.
  • "50521 OptionValue" or "50521 TextValue" are not valid.