XML Data Mapper

As of version 9.1, Kapow Katalyst has an XML Data Mapper that allows convenient mapping of the data records specified by an XML document into variables of suitable structure.

How to Create a Data Mapping

A data mapping is created in three steps:
  1. Selection of the relevant XML element in the source view:

    Issues specifically related to selection is further discussed under Selection.

  2. Configuration of the mapping through the "Extract with XML Data Mapper..." dialog accessible through the right-click context menu of the selected XML element:

    The open dialog confronts you with three areas of configuration:

    The actual mapping area is on the left where the leftmost column shows the available source entities, the top right area permits the choice of an appropriate target variable and type, and the bottom right area is reserved for the configuration of details for individual entity mappings. Each area is discussed in detail in the part about Configuration.

  3. Auto-generation of step sequence that performs the desired mapping at run-time. The steps are created automatically when the dialog is closed by a click on OK:

    The specifics of auto-generation is described in Auto-generation of Steps

Selection

While the selection of data is easy, it is important to know how selection and mapper interact. When a particular XML element has been selected, the following entities may be mapped into variable attributes using the mapper:

Note, that in order for the mapper to be activated for a given selection at least one mappable element must be associated with the selected element.

Configuration

The configuration step is where most of the user interaction takes place. The aim of the configuration step is to point out an appropriate target variable attribute for each source entity that you wish to map (i.e., it is not required to map all available sources). This mapping is undertaken in a number of steps:

Auto-generation of Steps

Once the configuration of a data mapping is done and you press OK in the dialog, the system auto-generates the actual steps required to perform the implied extractions and inserts these steps into the robot. The procedure always generates exactly one extract or extract tag attribute step for each association created in the mapper:

The step are aggregated into a group, which in essence can be thought of as the resulting data mapping, and inserted into the robot. In order to ensure the precision of the data mapping it must be anchored by a named tag that identifies the originally selected XML element. If such a named tag does not exist a Set Named Tag step is generated and inserted into the robot just before the actual data mapping:

Sometimes such a Set Named Tag is not necessary because a suitable named tag is already in place. For instance, this is often the case when the mapping is part of a loop:

How to Edit a Data Mapping

Once a data mapping has been configured it can be opened in the data mapper and edited again at a later time. Since data mappings are associated with group steps, the ability to reopen the mapper is also connected to group steps. For a given data mapping you can open the data mapper by selecting Open XML Data Mapper... from the context menu associated with the appropriate group step:

It is important to know that this will only work if the group step is the current step, i.e. green, because otherwise there may not be XML information to support the mapper. Another way of opening the mapper for a group step that is current is to click the Open XML Data Mapper... button in the associated step view:

Once open the mapper will behave exactly as described in How to Create a Data Mapping.

It is of course possible to edit the steps of a data mapping by hand. Only certain changes, however, are compatible with the XML data mapper and opening of a data mapping is therefore subject to a number of conditions, essentially expressing that the group step 'must' be a real data mapping: