XML Merge

Merge two XML documents together by matching on the value at the specified XPath's in each document. Use this Node to merge related data from a secondary dataset into the correct place within a parent dataset.

Properties

ParentDocument

Type: Xml Input
The parent XML document.

ChildDocument

Type: Xml Input
The child XML document.

ParentNamespaces

Type: Multiline Text Input
A list of namespace prefixes and namespaces (one per line) that are referenced in the parent XPath properties. See remarks for further details.

ParentXPath

Type: String Input
The XPath to the containing node for a single record in parent document.

ParentKeyXPath

Type: String Input
The XPath of the key element, relative to ParentXPath.

ChildNamespaces

Type: Multiline Text Input
A list of namespace prefixes and namespaces (one per line) that are referenced in the child XPath properties. See remarks for further details.

ChildXPath

Type: String Input
The XPath to the containing node for a single record in child document.

ChildKeyXPath

Type: String Input
The XPath of the key element, relative to ParentXPath.

MergedDocument

Type: Xml Output
The merged document.

Remarks

Enables two datasets to be merged together based on a key field. This Node is useful when its necessary to enrich a primary dataset with additional information before doing further processing on it.

For example, if a dataset of invoices needs to be extended to include more information on the customers for the invoices, the customer record matching the customer on each invoice can be merged into the invoices dataset (see example below for this specific use case).

Note that this Node handles merge only and does not handle transformation. It's generally recommended that it be used as a precursor to XSLT Transform or QuickMap.

Specifying Namespaces

The namespaces properties should contain a prefix and namespace in the format prefix:namespace one per line. The prefixes can then be referenced in the relevant XPath properties.

For example, declaring a namespace ns:http://uri.com/path enables evaluation of the XPath invoices/ns:invoice.

Examples

See Sample Workflow for an example.