# XML Output

## <img src="/files/Rpj2PyMff4ugmdgi32Ee" alt="" data-size="line"> XML Output

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

The XML Output transform allows you to write rows from any source to one or more XML files.

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

### Options

#### File Tab

The file tab is where you set general properties for the XML output file format.

| Option                          | Description                                                                                                                                                               |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Transform name                  | Name of the transform.                                                                                                                                                    |
| Filename                        | Specifies the file name and location of the output text file.                                                                                                             |
| Do not create file at start     | Enable to avoid empty files when no rows are getting processed.                                                                                                           |
| Pass output to servlet          | Enable this option to return the data via a web service instead writing into a file (see Hop data over web service).                                                      |
| Extension                       | Adds a period and the extension to the end of the file name (.xml).                                                                                                       |
| Include transformnr in filename | If you run the transform in multiple copies (see also Launching Several Copies of a transform), the copy number is included in the file name, before the extension (\_0). |
| Include date in filename        | Includes the system date in the file name (\_20041231).                                                                                                                   |
| Include time in filename        | Includes the system date in the file name (\_235959).                                                                                                                     |

#### Content Tab

| Option               | Description                                                                               |
| -------------------- | ----------------------------------------------------------------------------------------- |
| Zipped               | Check this if you want the XML file to be stored in a ZIP archive.                        |
| Encoding             | The encoding to use. This encoding is specified in the header of the XML file.            |
| Parent XML element   | The name of the root element in the XML document.                                         |
| Row XML element      | The name of the row element to use in the XML document.                                   |
| Split every …​ rows. | The maximum number of rows of data to put in a single XML file before another is created. |

#### Fields Tab

| Option        | Description                                                                                                                                                                                                                                                       |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Fieldname     | The name of the field.                                                                                                                                                                                                                                            |
| Elementname   | The name of the element in the XML file to use.                                                                                                                                                                                                                   |
| Content Type  | Is the field an attribute or Element                                                                                                                                                                                                                              |
| Type          | Type of the field can be either String, Date, or Number.                                                                                                                                                                                                          |
| Format        | The format mask used to convert the values                                                                                                                                                                                                                        |
| Length        | <p>The length option depends on the field type follows:</p><ul><li>Number - Total number of significant figures in a number</li><li>String - total length of string</li><li>Date - length of printed output of the string (e.g. 4 only gives back year)</li></ul> |
| Precision     | <p>The precision option depends on the field type as follows:</p><ul><li>Number - Number of floating point digits</li><li>String - unused</li><li>Date - unused</li></ul>                                                                                         |
| Currency      | Symbol used to represent currencies such as $10,000.00 or E5.000,00                                                                                                                                                                                               |
| Decimal       | A decimal point can be a "." (10,000.00) or "," (5.000,00)                                                                                                                                                                                                        |
| Group         | A grouping can be a "," (10,000.00) or "." (5.000,00)                                                                                                                                                                                                             |
| Null          | If the value of the field is null, insert this string into the textfile                                                                                                                                                                                           |
| Get fields    | Click to retrieve the list of fields from the input stream(s).                                                                                                                                                                                                    |
| Minimal width | Alter the options in the fields tab in such a way that the resulting width of lines in the text file is minimal; for example instead of save 0000001, "1" is written, and so on. String fields are not padded to their specified length.                          |


---

# 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/xmloutput.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.
