Creating Mappings
Overview
Once you have schemas attached, you can create mappings between source and target fields. The DataMapper offers two primary methods: drag-and-drop for quick mappings and XPath expressions for more control.
Drag and Drop Mapping
The easiest way to create a mapping is by dragging a source field onto a target field. A line will be drawn between the fields to visualize the connection.
Example: Map the Name Field

Drag-and-drop is the fastest way to create simple field mappings. The DataMapper automatically generates the correct XPath expression for you.
Container Mappings
When you drag a container field (a field that contains other fields, such as an XML element with child elements or a JSON object with properties) onto another container field, the DataMapper automatically maps their matching children — you don’t need to connect each child field individually.
How Container Mapping Works
- Drag a container field from the source tree onto a matching container field in the target tree
- The DataMapper automatically pairs children by name and creates individual mappings for each match
- This works recursively — nested containers are also matched and mapped automatically
- Children that exist only on one side are skipped

For XML schemas, children are matched by element name and namespace. For JSON schemas, children are matched by property key. When mapping between XML and JSON, children are matched by name.
Collection Mappings
When both the source and target fields are collections (marked with the collection icon), the DataMapper additionally wraps the mapping in a for-each loop that iterates over each item in the source collection.

Mapping Line Styles
After creating a container mapping, you’ll notice different line styles in the mapping view:
Regular — A solid gray line. A simple field-to-field mapping.
Copy-of — A double dark line. The source and target XML containers have identical structure (same name and namespace), so the DataMapper copies the entire subtree efficiently.

Complete — A dashed line with long dashes. All target children are mapped, and all nested containers among them use copy-of.
Partial — A dashed line with short dashes. Some target children are mapped, but not all have a matching source field, or nested containers are mapped field-by-field.

A partial mapping is not an error — it simply means some target fields don’t have a corresponding source field. You can add individual mappings for the remaining fields manually.
When Container Mapping Is Not Available
In some cases, the DataMapper will not allow a container-to-container mapping:
- Mismatched field types: A container field can only be mapped to another container field. Dragging a container onto a leaf field (or vice versa) will be rejected.
- No compatible children: If the source and target containers have no children with matching names, the mapping cannot be created.
- JSON arrays: JSON array wrapper fields cannot be mapped directly — expand the array and map its children instead.
If a drop is rejected, try mapping the children individually instead of the parent container.
XPath Expression Mapping
For more control over your mappings, you can type XPath expressions directly.
Create a Mapping with XPath
- Double-click on a target field to activate inline editing and type an XPath expression directly, without opening the 3-dot menu.

Alternatively, you can click the 3-dot mapping context menu on the target field and click “Add Selector expression”
- Enter your XPath expression

Type the XPath expression
XPath expressions give you full control over data transformation, including string manipulation, calculations, and conditional logic. For complex expressions, consider using the XPath Editor.
Comment on a Mapping
Once a mapping is created, you can also comment on it.
- Click the 3-dot menu on the target field

- Add your comment

Delete a Mapping
If you need to remove a mapping, click the trash icon
next to the target field and confirm the deletion.


You can also delete a mapping by selecting the target field and pressing the Delete key on your keyboard.
Deleting a mapping is permanent and cannot be undone. Make sure you want to remove the mapping before confirming.
Next Steps
Now that you can create and manage basic mappings:
- Add conditional logic with if, choose-when-otherwise, and for-each
- Use the XPath editor for complex transformations with functions