cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping issue - mapping works for only first context node

Former Member
0 Kudos

Hello:

I am using a advance udf function to break a long text field into 2 characters each. It works absolutely fine for the first context node but does not work after.

For eg:

Input structure:

<ns0:MT_in xmlns:ns0="http://xxxx">

-


<MTXH>

-


<MTXL>

-


<TDLine>1122</TDLine>

-


</MTXL>

-


</MTXH>

-


<MTXH>

-


<MTXL>

-


<TDLine>3344</TDLine>

-


</MTXL>

-


</MTXH>

</ns0:MT_in>

The output is:

<ns0:MT_out xmlns:ns0="http://xxxx">

-


<MTXH>

-


<MTXL>

-


<TDline>11</TDline>

-


</MTXL>

-


<MTXL>

-


<TDline>22</TDline>

-


</MTXL>

-


</MTXH>

-


<MTXH>

-


<MTXL/>

-


<MTXL/>

-


</MTXH>

</ns0:MT_out>

As you see above, the second MTXH node doesnot have a TDLINE but my requirement is it should have the values "33 and 44" just like the first MTXH.

Please help with this.

Thanks

MLS

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Resolved it myself.

Was using 2 udfs, one to split the text and store them to GlobalContainer and second UDF to retreive it. But using just the first UDF solved it.

Former Member
0 Kudos

make the context of TDline to whole message, that is to MTXH; to do this; right click on TDline choose Context -> MTXH