on 12-23-2009 9:05 AM
Hello
I have ascenario in PI where I recieve an XML document in the format.
<root>
<node attribute1="Att1Val1" attribute2="Att2Val1">Value1</node>
<node attribute1="Att1Val2" attribute2="Att2Val2">Value2</node>
...
</root>
I want to map the data to an IDoc in the format
<idoc>
...
<znode>
<attribute1>Att1Val1</attribute1>
<attribute2>Att2Val1</attribute2>
<znodeval>Value1</znodeval>
</znode>
<znode>
<attribute1>Att1Val2</attribute1>
<attribute2>Att2Val2</attribute2>
<znodeval>Value2</znodeval>
</znode>
...
</idoc>
However i wasn't able to get this to work using graphical mapping - from the second occurence of <node> the <znodeval> is not created and Value2 is lost.
Is there a correct way to accomplish this?
Thanks in advance,
Gershon.
Hi Gershon,
Seeing your source and target structure it looks like a simple graphical mapping would be enough. Just check whether you have mapped like this:
node-->znode
attribute1--> znode-attribute1
attribute2--> znode-attribute2
node-->znodeval
if this doesn't work try changing the mapping to
node>removecontext>znode
attribute1>splitbyValue> znode-attribute1
attribute2> splitbyValue>znode-attribute2
node>splitbyValue>znodeval
Regards
Suraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks alot - the splitByValue solved it.
Best regards,
Gershon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.