# Edi to XML

## ![](/files/e3boCBYoopiNPS2u1hau) Edi to XML

### Description <a href="#description" id="description"></a>

The Edi To XML transform converts EDI message text (conforming to the ISO 9735 standard, [read more](https://en.wikipedia.org/wiki/EDIFACT)) to generic XML.

The XML text is more accessible and allows for selective data extraction using XPath and the [Get Data From XML](/data-shaper-1.21/knowing-the-data-shaper-designer/pipelines/transforms/getdatafromxml.md) transform.

| Hop Engine | <sup>✓</sup> |
| ---------- | ------------ |
| Spark      | ?            |
| Flink      | ?            |
| Dataflow   | ?            |

### Options

The transform configuration requires the field name containing the EDI text, and an output field name for the XML text. If the output field name is left empty, the EDI text is going to be replaced by the XML text.

The structure of the XML output follows the following pattern:

```highlight
<edifact>
    <SEGMENT>
        <element>
            <value></value>
            ...
        </element>
        ...
    </SEGMENT>
    ...
</edifact>
```

The conversion rules are:

* the root of the document is the "edifact" tag
* each segment in the edifact message is converted to a tag, using the segment name as the tag name
* each field within a segment is represented by an "element" tag
* each value within a field is represented by an "value" tag


---

# Agent Instructions: 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:

```
GET https://docs.primeur.com/data-shaper-1.21/knowing-the-data-shaper-designer/pipelines/transforms/edi2xml.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
