---
schema_version: "1"
id: 0c5ec4cb956471a8a97c6a33e48e95556090765a83be3ca1e5cc2a8f8827593c
title: DataWeave Format (dw)
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.3/dataweave-formats-dw.md
canonical_url: https://docs.mulesoft.com/dataweave/2.3/dataweave-formats-dw
source_site: docs.mulesoft.com
content_type: documentation
content_hash: b3eb8e41aa712c9fd9fec11baa71a2acac32311be4243fc10a928a7319612ade
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
---
product: DataWeave
version: 2.3
---

# DataWeave Format (dw)

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

MIME Type: `application/dw`

ID: `dw`

The DataWeave (dw) format is the canonical format for all transformations. This format can help you
understand how input data is interpreted before it is transformed to a new format.

> [!NOTE] This format is intended to help you debug the results of DataWeave transformations. It is
> significantly slower than other formats. It is not recommended to be used in production
> applications because it can impact the performance.

## Example: Express XML in the DataWeave (dw) Format

The following example shows how to transform XML input to the DataWeave (dw) format.

### Input

The example uses the following XML snippet as input.

```xml
<employees>
  <employee>
    <firstname>Mariano</firstname>
    <lastname>DeAchaval</lastname>
  </employee>
  <employee>
    <firstname>Leandro</firstname>
    <lastname>Shokida</lastname>
  </employee>
</employees>
```

#### Output

Output: in DataWeave Format

```dataweave
{
  employees: {
    employee: {
      firstname: "Mariano",
      lastname: "DeAchaval"
    },
    employee: {
      firstname: "Leandro",
      lastname: "Shokida"
    }
  }
} as Object {encoding: "UTF-8", mimeType: "text/xml"}
```

## Configuration Properties

DataWeave supports the following configuration properties for the DataWeave (dw) format.

### Reader Properties (for dw)

The DataWeave (dw) format accepts properties that provide instructions for reading input data.

<table><colgroup><col> <col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><p><code>externalResources</code></p></td><td><p><code>Boolean</code></p></td><td><p><code>false</code></p></td><td><p>Enables reading external entities on <code>readUrl</code>. Valid options are <code>true</code> or <code>false</code>.</p></td></tr><tr><td><p><code>javaModule</code></p></td><td><p><code>Boolean</code></p></td><td><p><code>false</code></p></td><td><p>Enables you to load Java module functions. Valid options are <code>true</code> or <code>false</code>.</p></td></tr><tr><td><p><code>onlyData</code></p></td><td><p><code>Boolean</code></p></td><td><p><code>true</code></p></td><td><p>Indicates whether to handle data only and not other types of content, such as functions. Valid options are <code>true</code> or <code>false</code>. Note that the parser runs faster in the <code>onlyData</code> mode.</p></td></tr></tbody></table>

### Writer Properties (for dw)

The DataWeave (dw) format accepts properties that provide instructions for writing output data.

<table><colgroup><col> <col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><p><code>bufferSize</code></p></td><td><p><code>Number</code></p></td><td><p><code>8192</code></p></td><td><div><div><p>Size of the writer buffer.</p></div></div></td></tr><tr><td><p><code>deferred</code></p></td><td><p><code>Boolean</code></p></td><td><p><code>false</code></p></td><td><div><div><p>When set to <code>true</code>, DataWeave generates the output as a data stream, and the script’s execution is deferred until it is consumed. Valid values are <code>true</code> or <code>false</code>.</p></div></div></td></tr><tr><td><p><code>ignoreSchema</code></p></td><td><p><code>Boolean</code></p></td><td><p><code>false</code></p></td><td><div><div><p>Flag that indicates whether the DataWeave writer ignores the schema. Valid values are <code>true</code> or <code>false</code>.</p></div></div></td></tr><tr><td><p><code>indent</code></p></td><td><p><code>String</code></p></td><td><p><code>' '</code></p></td><td><div><div><p>The string to use for indentation.</p></div></div></td></tr><tr><td><p><code>maxCollectionSize</code></p></td><td><p><code>Number</code></p></td><td><p><code>-1</code></p></td><td><div><div><p>The maximum number of elements allowed in an array or object. <code>-1</code> indicates that no limitation is set.</p></div></div></td></tr><tr><td><p><code>onlyData</code></p></td><td><p><code>Boolean</code></p></td><td><p><code>true</code></p></td><td><div><div><p>Indicates whether to handle data only and not other types of content, such as functions. Valid options are <code>true</code> or <code>false</code>. Note that the parser runs faster in the <code>onlyData</code> mode.</p></div></div></td></tr></tbody></table>

## Supported MIME Types (for dw)

The DataWeave (dw) format supports the following MIME types.

<table><colgroup><col></colgroup><thead><tr><th>MIME Type</th></tr></thead><tbody><tr><td><p><code>*/dw</code></p></td></tr></tbody></table>
