XML Structure Tab: Order By Node Column

Explanation | Example

Applies to: Marshalling data to XML only

Available: For mapped nodes only when the option Sort XML Output Records Using ORDER BY (default) has been selected from the XML Structure tab toolbar. On an element or attribute node that is mapped to a DB column or expression

Possible values:

Not currently set. You may check this node to group occurrences of this node by node value in the XML output from the marshalling operation.

Occurrences of this node will be grouped together in ascending order by node value in the results of the marshal operation.

Occurrences of this node will be grouped together in descending order by node value in the results of the marshal operation.

Explanation

Summary | Examples

Allora offers three options for sorting XML output nodes:

Choose which option using the Select Sort/ORDER BY Method icon in the XML Structure toolbar.

This option is available if a node is mapped to a DB column or an expression. It is not available for nodes that are added to the mapping file without being mapped or nodes that are mapped to constants.

The options can be set on an attribute or an element and the field or expression to which the node is mapped is added to the SELECT statement automatically generated when marshalling. Results are ordered by value unlike when using Sort Children where results are ordered by tag.

When more than one field is used in the ORDER BY clause, you may want to set a sequence. For example, if you set ORDER BY on both employee ID and department name, you would want to order by department name first, then employee ID. Click Set ORDER BY Sequence in the XML Structure tab toolbar to open a dialog and set the sequence.

 

Examples

Summary | Explanation

 

 

Marshal with Combine Project

Overview of the project used in examples below.

1.

Marshal Without Combine

No settings have been made in the XML Structure tab

2.

Marshal with Combine

XML output combines all PurchaseOrder nodes that have a matching value for the OrderID node.

3.

Marshal with Combine and Group

 XML output groups  all matching elements (LineItem) together

4.

 

Marshal with Combine and Order By

XML output contains records retrieved from the database using an ORDER BY clause

5.

Marshal with Optimized Combine

XML output generated using the Optimized Combine feature in the XML Structure tab.

See Also

XML Structure Tab
Introduction to Combining Nodes in XML Output When Marshalling

Combining Duplicate Elements in XML Output

Customizing Combine Settings for XML Output