> For the complete documentation index, see [llms.txt](https://academy.pentaho.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://academy.pentaho.com/pentaho-data-integration/data-integration/enrich-data/joins/xml-join.md).

# XML Join

{% hint style="warning" %}
**Workshop - XML Join**
{% endhint %}

{% hint style="info" %}

#### XML Join in Pentaho Data Integration

XML Join is a specialized step in Pentaho Data Integration designed to incorporate XML content into your data stream based on values from another stream.

This step accepts two input streams - the main data stream and an XML stream. It merges them by adding the XML content as a new field in your main data stream.

The XML stream must contain well-formed XML data that will be integrated into your transformation. The main stream contains the records you want to enhance with this XML content.

For each row in the main stream, PDI matches it with corresponding XML content based on a specified join key. The XML content is then added as a new field to the main stream row.

XML Join is particularly useful when dealing with web services, XML databases, or when you need to construct complex XML documents from relational data sources.

The step offers options to specify the target XML field name, the join comparison field, and the ability to encode the XML content if needed for further processing.

When configuring XML Join, you must specify which stream provides the XML content and which one serves as the main stream. The order of connecting these streams to the step is critical to its proper functioning.
{% endhint %}

***

{% tabs %}
{% tab title="English" %}

<figure><img src="/files/z7vFACJBMtrgJuTTeKXt" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Second Tab" %}

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Create a new Transformation**

Any one of these actions opens a new Transformation tab for you to begin designing your transformation.

* By clicking File > New > Transformation
* By using the CTRL-N hot key
  {% endhint %}

{% tabs %}
{% tab title="First Tab" %}

{% endtab %}

{% tab title="Second Tab" %}

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://academy.pentaho.com/pentaho-data-integration/data-integration/enrich-data/joins/xml-join.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
