Is it possible to set sorting on an XML export?

1
My XML is based as follows: <ProductionOrderLines> <ProductionLines> <No>QPO150040</No> <Lineno>40000</Lineno> <DueDate>11-05-15</DueDate> </ProductionLines> <ProductionLines> <No>QPO150040</No> <Lineno>140000</Lineno> <DueDate>27-04-15</DueDate> </ProductionLines> <ProductionLines> <No>QPO150044</No> <Lineno>90000</Lineno> <DueDate>15-05-15</DueDate> </ProductionLines> </productionorderlines> And I user ProductionOrderLines as input for my XML Export. Is it possible to add a sorting to the output XML so that it sorts on <no>, and then <lineno>? Even if this would require adding a (background) sorting number that would be fine aswell, but I can't find the option anywhere to sort the output.
asked
2 answers
0

In what order are the attributes of the entity in your domain model? Try putting them in the desired order. You might need to recreate the mapping...

There's no explicit way to set the ordering but that might influence it. I'm not near the source code now so I can't check.

answered
1

I haven't tried this myself but I think it should work:

In your Domain-to-XML mapping, child elements are retrieved over association by default. However, you can specify a microflow to retrieve child elements. In your microflow:

  • Retrieve the child element list over association
  • Sort the resulting list using a list operation
  • Return the sorted list
answered