Introduction to Combining Nodes in XML Output when Marshalling

You probably want XML output from marshalling operations to appear in a nested format in the following situations:

<Orders ID="10643" Date="9/25/1995" CustomerID="ALFKI">
  <Item_Detail>
    <ID_Order>10643</ID_Order>
    <ID_Product>46</ID_Product>
    <Product>Spegesild</Product>
    <UnitPrice>12</UnitPrice>
    <Quantity>2</Quantity>
    <Discount>0.25</Discount>
  </Item_Detail>
  <Item_Detail>
    <ID_Order>10643</ID_Order>
    <ID_Product>39</ID_Product>
    <Product>Chartreuse verte</Product>
    <UnitPrice>18</UnitPrice>
    <Quantity>21</Quantity>
    <Discount>0.25</Discount>
  </Item_Detail>
  <Item_Detail>
    <ID_Order>10643</ID_Order>
    <ID_Product>28</ID_Product>
    <Product>Rössle Sauerkraut</Product>
    <UnitPrice>45.6</UnitPrice>
    <Quantity>15</Quantity>
    <Discount>0.25</Discount>
  </Item_Detail>
</Orders>

The XML Structure tab in the Mapper allows you to define how you want your XML output to appear.

By default, the Combine property is not set because of the potential increase in memory usage for large XML documents. XML output looks as follows when the Combine property is not set:

<Orders ID="10643" Date="9/25/1995" CustomerID="ALFKI">
<Item_Detail>
<ID_Order>10643</ID_Order>
<ID_Product>46</ID_Product>
<Product>Spegesild</Product>
<UnitPrice>12</UnitPrice>
<Quantity>2</Quantity>
<Discount>0.25</Discount>
</Item_Detail>
</Orders>
<Orders ID="10643" Date="9/25/1995" CustomerID="ALFKI">
<Item_Detail>
<ID_Order>10643</ID_Order>
<ID_Product>39</ID_Product>
<Product>Chartreuse verte</Product>
<UnitPrice>18</UnitPrice>
<Quantity>21</Quantity>
<Discount>0.25</Discount>
</Item_Detail>
</Orders>
<Orders ID="10643" Date="9/25/1995" CustomerID="ALFKI">
<Item_Detail>
<ID_Order>10643</ID_Order>
<ID_Product>28</ID_Product>
<Product>Rössle Sauerkraut</Product>
<UnitPrice>45.6</UnitPrice>
<Quantity>15</Quantity>
<Discount>0.25</Discount>
</Item_Detail>
</Orders>

See Also

Setting Up Nested XML Elements for Marshalling
Combine Node Wizard

Combining Duplicate Elements in XML Output

Customizing Combine Settings for XML Output

Sample Marshal with Combine Project