Hello all.
I am currently attempting to develop a scenario that takes a CSV file and maps it to an XML file.
I have defined two XML structures, one is a very simple flat one, used for the CSV import in cooperation with the plan2xml adapter module. The second is a more complex XML structure that will be the target message.
The source file has 5 fields that are multidimensional. So for example, there is a field called WEIGHT in which the value of the field may be:
5.800,7.400,4.200,1.606
The target XML structure has an unbounded element, consisting of several subelements. Looks similar to this:
-UnboundedElement
-element1
-element2
-element3
-element4
I would like to loop the unbounded element, so that for each multidimensional field in the source message, I can store that data in the unbounded element. So, more simply, it should look something like this:
Start Loop:
-First iteration:
copy 5.800 to element1 of unboundedelement
-Second iteration
copy 7.400 to element1 of unboundedelement
etc.
(1) First I need to know how to create that loop.
(2) Second, what is the best way to map this? It seems to me that there should be a way to combine existing functions to make this possible. But do you think I would have to create a user defined function to do this?
Thanks in advance. I hope I explained this clearly enough.