on 12-01-2011 2:04 PM
Hi,
I need to do a message mapping to go from
<message>
<structure>
field1
field2
fieldA
fieldB
</structure>
<structure>
field1
field2
fieldC
fieldD
</structure>
<structure>
field3
field4
fieldE
fieldF
</structure>
<structure>
field3
field4
fieldG
fieldH
</structure>
etc..
to
<message>
<structure>
field1
field2
<substructure>
fieldA
fieldB
</substructure>
<substructure>
fieldC
fieldD
</substructure>
</structure>
<structure>
field3
field4
<substructure>
fieldE
fieldF
</substructure>
<substructure>
fieldG
fieldH
</substructure>
etc..
I've managed to create as many target structures as there are occurences of the first field in the source structure, but i cannot find the solution to create the correct amount of substructures inside the target structures. Can it be done with graphical mapping?
Any help appreciated.
Kr
Robert
Hi,
Maybe it's your source structure whcih is not well formed... Does your source is a flat file converted in XML (os with FCC).
because your source look like:
field1 without substructure
field2
fieldA of substructure of field2
fieldB of substructure of field2
repeat several times...
so something like that:
<OneRecord>
Header_1 without item
Header_2 with:
___item_2_1 of header_2
___item_2_2 of header_2.
<OneRecord>
repeat several times, as many you have of <Record>.
if it's that you should reorganized the source srtucture as above, and so to have recordset maybe like:
Header1 , 1 , header2 , 1 , item1 , 1 item2, 1
by reorganizing the source, you will be simply your target mapping.
regards.
Mickael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mikael
My source is from flatfile which looks like
1;2;A;B
1;2;C;D
3;4;E;F
3;4;G;H
etc
So my representation of source was not exactly correct. It should have been
<structure>
<field1>value1</field1>
<field2>value2</field2>
<field3>valueA</field3>
<field4>valueB</field4>
</structure>
<structure>
<field1>value1</field1>
<field2>value2</field2>
<field3>valueC</field3>
<field4>valueD</field4>
</structure>
etc
etc
Hope this is more clear.
kr
Robert
Hi
Already found the solution:
field1(context of highest level) -> Split by value(valuechange) -> collapse context -> targetStructure
field1(context of highest level) -> Split by value(valuechange) -> collapse context -> splitbyValue(eachvalue) -> field1
field 2 same way as field one
field3 -
> }
->->->->->->->->->->->->->->->->->->} formatByExample ---> substructure
field1(context of highest level) -> Split by value(valuechange)----->}
field 3 -> field 3
field 4 -> field 4
KR
Robert
Edited by: R. den Hoedt on Dec 1, 2011 3:54 PM
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.