# Writing to multiple files

Create a structure that writes to different files.

## About this task

In this example, you want to create a structure that inherits from two other structures and writes the output to two XML files.

## Procedure

1. Create a new empty structure with an XML representation.
2. Create a root element, then create a child element named ShipNotice.
3. In the ShipNotice element properties, click the ... button to the right of Inherits From and select Examples &gt; Structures &gt; Simple &gt; POStandard &gt; SimpleShipNotice.

   The child elements are automatically added under ShipNotice.
4. Drag and drop a WriteURL function in the IO/Database tab of the ShipNotice element.
5. Double-click WriteURL to define its properties:
   ### Example
   | Property | Value |
   | --- | --- |
   | Representation | XML |
   | URL | URL to the file to write to, file:///c:/users/jsmith/documents/shipnotice.xml<br>for example. |
   | Append | Select this check box if you want to append this file at each<br>execution. |

   ![](https://help.qlik.com/talend/en-US/data-mapper-user-guide/Resources/images/write_multiple_files_01_writeurl_properties.png)
6. Create a new element named PurchaseOrders under the root.
7. In the PurchaseOrders element properties, click the ... button to the right of Inherits From and select Examples &gt; Structures &gt; Paypal &gt; PurchaseOrder2.
8. Drag and drop a WriteURL function in the IO/Database tab of the PurchaseOrders element.
9. Double-click WriteURL to define its properties:
   ### Example
   | Property | Value |
   | --- | --- |
   | Representation | XML |
   | URL | URL to the file to write to, file:///c:/users/jsmith/documents/purchaseorders.xml<br>for example. |
   | Append | Select this check box if you want to append this file at each<br>execution. |
10. Press Ctrl + S to save your structure.

## Results

Your structure is created and configured to write to two different XML files, you can now use it in a map. ![](https://help.qlik.com/talend/en-US/data-mapper-user-guide/Resources/images/write_multiple_files_02_writeurl.png)