> 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

Join XML streams ..

{% 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="https://3680356391-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZpCSy6Skj215f4oWypdc%2Fuploads%2Fgit-blob-584cb22338cb84d1f3ad1ea19594b213c96af678%2Fxml_join.png?alt=media" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
