Skip to main content Skip to complementary content

Embedding multiple representations

Use the ReadNested function to create a structure that inherits from other structures with different representations.

About this task

In this example, you want to create a flat structure that embeds two existing XML structures.

Procedure

  1. Create a new empty structure with a Flat representation.
  2. Create a Root element with the following properties:
    Property Value
    Group Type Sequence
    Data Type None
    For more information, see Structure element properties.
  3. Drag a ReadMapInput function in the IO/Database tab of the Root element.
    An I/O function is needed to enclose the ReadNested functions to be added in the next steps. In this example, ReadMapInput is used because there is no need for special I/O handling in this element.
  4. Create a new PurchaseOrders element under Root, then click the ... button to the right of the Inherits From field and select the structure Examples > Structures > PayPal > PurchaseOrder2.
  5. In the Inherited Root drop-down list, select Use Everything.
    The child elements are added under PurchaseOrders.
  6. Configure the following properties for the PurchaseOrders element:
    Property Value
    Group Type Sequence
    Data Type None
    Initiator <PurchaseOrders>
    Include Initiator? Select this check box
  7. Drag a ReadNested function in the IO/Database tab, then double-click them and select the XML representation.
  8. Create a new POs element under Root, then click the ... button to the right of the Inherits From field and select the structure Examples > Structures > Simple > POStandard > POFile.
  9. In the Inherited Root drop-down list, select Use Everything.
    The child elements are added under POs.
  10. Configure the following properties for the POs element:
    Property Value
    Group Type Sequence
    Data Type None
    Initiator <POs>
    Include Initiator? Select this check box
  11. Remove the ReadURL function added automatically to the IO/Database tab and drag and drop a ReadNested function, then double-click it and select the XML representation.
  12. Press Ctrl + S to save your structure.

Results

You now have a flat structure that can embeds two XML structures. You can find an example of this structure used in a map in Other Projects > Examples > Maps > MultiInputOutput > PurchaseOrdersToMandP.

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!