Skip to main content Skip to complementary content

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 > Structures > Simple > POStandard > 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 for example.
    Append Select this check box if you want to append this file at each execution.
  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 > Structures > Paypal > 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 for example.
    Append Select this check box if you want to append this file at each 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.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!