The following settings have been applied to the sample project whose output was described in 1: Marshal Without Combine.
On the PurchaseOrder element, set Combined Node.
The OrderID element already has a check in the Combine Key column. Leave the check mark so that the OrderID element is used to identify matching records.
The Eliminate Duplicates column has been checked for the PurchaseOrder element so that all repeated sub-elements of PurchaseOrder (Customer, OrderDate, RequiredDate, ShipDate, etc.) are removed.
The table below displays a single XML output record instead of the four records in The following settings have been applied to the sample project whose output was described in 1: Marshal Without Combine. The four records have been combined into a single record with multiple LineItem elements. However, note that the XML output still contains a number of repeated elements: Customer, OrderDate, RequiredDate, ShipDate and so on. By modifying settings in the XML Structure tab, you can remove duplicate elements in the XML output file.
|
<xml> |
|
1. |
No settings have been made in the XML Structure tab | |
|
2. |
Marshal with Combine |
This page. |
|
3. |
XML output groups all matching elements (LineItem) together | |
|
4.
|
XML output contains records retrieved from the database using an ORDER BY clause | |
|
5. |
XML output generated using the Optimized Combine feature in the XML Structure tab. |
Marshal with Combine
Project
XML Structure Tab
Introduction to Combining Nodes in XML Output when Marshalling
Combining Duplicate Elements in XML Output
Customizing Combine Settings for XML Output