---
schema_version: "1"
id: cf3936fb6a13e997a93f71ef14120281897d5a17923d145d3006cabe3af7e295
title: DataWeave (dw) Format
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.9/dataweave-formats-dw.md
canonical_url: https://docs.mulesoft.com/dataweave/2.9/dataweave-formats-dw
source_site: docs.mulesoft.com
content_type: documentation
content_hash: e3a80fcae51a33dc3c0b5714f22824b8ffadf6b0a34e1d6386c83d1cf4653ece
description: MuleSoft Documentation Site
release: "2.9"
latest: false
---
---
product: DataWeave
version: 2.9
keywords: format, dw, */dw, application/dw
---

# DataWeave (dw) Format

> 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 this format.

### Reader Properties

This 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><div><div><p>Enables the <code>readUrl</code> to read external entities.</p></div><div><p>Valid values are <code>true</code> or <code>false</code>.</p></div></div></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><div><div><p>Enables Java module functions to load.</p></div><div><p>Valid values are <code>true</code> or <code>false</code>.</p></div></div></td></tr><tr><td><p><code>onlyData</code></p></td><td><p><code>Boolean</code></p></td><td><p><code>false</code></p></td><td><div><div><p>Handles only data and not other types of content, such as functions, when set to <code>true</code>. The DataWeave parser runs faster in the <code>onlyData</code> mode.</p></div><div><p>Valid values are <code>true</code> or <code>false</code>.</p></div></div></td></tr><tr><td><p><code>privileges</code></p></td><td><p><code>String</code></p></td><td><p><code>''</code></p></td><td><div><div><p>Accepts a comma-separated list of privileges to use in the format, such as <code>'Resources,Properties'</code>.</p></div></div></td></tr></tbody></table>

### Writer Properties

This 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 buffer writer, in bytes. The value must be greater than <code>8</code>.</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>Generates the output as a data stream when set to <code>true</code>, and defers the script’s execution until the generated content is consumed.</p></div><div><p>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>Ignores the schema when set to <code>true</code>.</p></div><div><p>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>String to use for indenting.</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>Maximum number of elements allowed in an array or an object. <code>-1</code> indicates no limitation.</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>Handles only data and not other types of content, such as functions, when set to <code>true</code>. The DataWeave parser runs faster in the <code>onlyData</code> mode.</p></div><div><p>Valid values are <code>true</code> or <code>false</code>.</p></div></div></td></tr></tbody></table>

## Supported MIME Types

This 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>
