How can I refer to the order id in the meta data related to items in the below example XML snippet?
111ORD
trader
2IT
12
I am using the XMLExtract components to extract the orders and write them to a CSV and extract the contents of Items and write the order line items to a seperate CSV file, but also want to write the order ID as a field for each item row in the CSV file. How should I set the parentKey in the Mapping element for item in this case? setting it as order.rderid or orders.order.orderid does not work. I also have to refer a field in the parent for children that are nested deeper than in the example I have given above.
If I am writing order data records and item records to 2 different CSV files how can I refer to the order id so I can write it as a field in the item records CSV file.
For more complicated structure you will have to add artificial key field and fulfil it with sequence value - see sequenceField in XMExtract. Then you can use MergeJoin to join data due to this special field.