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
- Create a new empty structure with a Flat representation.
-
Create a
Root
element with the following properties:
For more information, see Structure element properties.Property Value Group Type Sequence Data Type None -
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. - 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.
-
In the Inherited Root
drop-down list, select Use
Everything.
The child elements are added under PurchaseOrders.
-
Configure the following properties for the
PurchaseOrders element:
Property Value Group Type Sequence Data Type None Initiator <PurchaseOrders> Include Initiator? Select this check box -
Drag a ReadNested
function in the IO/Database tab, then
double-click them and select the XML
representation.
- 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.
-
In the Inherited Root
drop-down list, select Use
Everything.
The child elements are added under POs.
-
Configure the following properties for the
POs element:
Property Value Group Type Sequence Data Type None Initiator <POs> Include Initiator? Select this check box -
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.
- Press Ctrl + S to save your structure.