Skip to main content Skip to complementary content

Creating structures for the Route

Create the input and output structures that will be used in the cMap component of the Route.

Before you begin

You have an XML file to use as input. You can use the following sample:
<orders>
	<order>
		<orderId>abc-6545165186</orderId>
		<shippingDetails>
			<lastName>Kennedy</lastName>
			<firstName>John</firstName>
			<street>Santa Rosa South</street>
			<city>Columbus</city>
			<state>New York</state>
		</shippingDetails>
		<items>
			<item>
				<id>4987601</id>
				<price>649.99</price>
				<quantity>1</quantity>
			</item>
			<item>
				<id>8570817</id>
				<price>99.99</price>
				<quantity>3</quantity>
			</item>
		</items>
	</order>
</orders>

Procedure

  1. In the Data Mapper tab, expand the Hierarchical Mapper node and right-click Structures.
  2. Click New > Structure.
  3. In the wizard that opens, select Import a structure definition and click Next.
  4. Select XML Sample Document and click Next.
  5. Select your XML file and click Next.
  6. Keep the default encoding and click Next.
  7. Select a folder and enter a name for your structure, then click Next.
  8. Click Finish.
    Your input structure is created. You can now create the output structure.
  9. Right-click Structures, click New > Structure, select Create a structure that is a customization by inheriting from another structure and click Next.
  10. Select the input structure you created and click Next.
  11. Select a folder and enter a name for your structure, then click Next.
  12. Click Finish.
    A structure identical to your input structure is created, you can now customize it.
  13. Add new elements to the output structure:
    1. Right-click the order element and click New Element.
    2. Name the new element orderTotal and set its Data Type to Decimal.
    3. Create two more elements under order named orderDate and shippingDueDate, and set their Data Type to Date.
    4. Expand the items/item nodes and create a new element under item named itemTotal and set its Data Type to Decimal.
    Your structure should look like this:
  14. Save the output structure.

Results

You have an input and an output structure, you can now create your Route.

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!