|
Home > Archive > BizTalk Server General > June 2006 > Mapping Problem - Calling Mapping GURUS...!!
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Mapping Problem - Calling Mapping GURUS...!!
|
|
| Jay Kinker 2006-06-23, 1:18 pm |
| Hi,
I am not able to read data from repeting nodes:
structure of the source XML is :
<RootNode>
<Node1>
<Data> ABC </Data>
</Node1>
<Node1>
<Data> XYZ </Data>
</Node1>
...
...
</RootNode>
My requirement is to concatinate the values of <Data> found in the
repetitive occurences of <Node1>. The concatinated value will be mapped to a
single element/node the destination schema
Note - <Node> can appear any number of times.
Any suggestion / pointer towards the solution will be helpful.
Regards,
Jay Kinker__
| |
|
| In BizTalk 2006, there is a functoid called "Cumulative Concatenate" (part of
the Cumulative functoids) that does exactly what you are describing. Hope
this helps.
"Jay Kinker" wrote:
> Hi,
>
> I am not able to read data from repeting nodes:
>
> structure of the source XML is :
>
> <RootNode>
> <Node1>
> <Data> ABC </Data>
> </Node1>
> <Node1>
> <Data> XYZ </Data>
> </Node1>
> ...
> ...
> </RootNode>
>
> My requirement is to concatinate the values of <Data> found in the
> repetitive occurences of <Node1>. The concatinated value will be mapped to a
> single element/node the destination schema
>
> Note - <Node> can appear any number of times.
>
> Any suggestion / pointer towards the solution will be helpful.
>
> Regards,
>
> Jay Kinker__
>
| |
| Jay Kinker 2006-06-23, 1:18 pm |
| Hi Steve,
Thanks for your help.
Any idea how we can do it using the conventional set of funtoids from
Advance functoid - related to loop?
Other than BTS2006 I also have to give support on BizTalk 2002 for the same
issue.
Regards,
Jay Kinker__
"Steve" wrote:
[vbcol=seagreen]
> In BizTalk 2006, there is a functoid called "Cumulative Concatenate" (part of
> the Cumulative functoids) that does exactly what you are describing. Hope
> this helps.
>
>
> "Jay Kinker" wrote:
>
| |
|
| Are open to use Custom script functoid?
-Kiran
Jay Kinker wrote:[vbcol=seagreen]
> Hi Steve,
>
> Thanks for your help.
>
> Any idea how we can do it using the conventional set of funtoids from
> Advance functoid - related to loop?
>
> Other than BTS2006 I also have to give support on BizTalk 2002 for the same
> issue.
>
> Regards,
>
> Jay Kinker__
>
> "Steve" wrote:
>
| |
| Sujesh 2006-06-25, 1:19 am |
| You can use custom xslt to do this.
"Pabba" wrote:
> Are open to use Custom script functoid?
>
> -Kiran
>
> Jay Kinker wrote:
>
>
| |
| Jay Kinker 2006-06-26, 7:25 am |
| Hi Pabba, Sujesh
Yes, Custom script functoid and XSLT will be good option for me.
If possible, Could be please provide any dummy code to that?
Thanks,
Jay Kinker__
"Pabba" wrote:
> Are open to use Custom script functoid?
>
> -Kiran
>
> Jay Kinker wrote:
>
>
| |
|
| Hi Jay,
Copy the below code into a Custom Script Functoid and link the source
"RootNode\Node1\Data" node as input and will output cumulative result
to the target "Data" node. The C# code uses Global variable that
appends each source record data but creates target record with each
appended result.
C# code:
System.Text.StringBuilder GlobalString = new
System.Text.StringBuilder();
public System.Text.StringBuilder AddGlobalString(string param1)
{
GlobalString.Append(param1);
return GlobalString;
}
Note: This generates multiple target Data nodes and the last Data node
holds your expected output.
Hope this helps, I can also provide you with custom Xslt code.
Regards,
Kiran Pabba
Jay Kinker wrote:[vbcol=seagreen]
> Hi Pabba, Sujesh
>
> Yes, Custom script functoid and XSLT will be good option for me.
> If possible, Could be please provide any dummy code to that?
>
>
> Thanks,
>
> Jay Kinker__
>
>
> "Pabba" wrote:
>
| |
| Jay Kinker 2006-06-27, 7:20 am |
| Hi Pabba,
Please forward the custom XSLT code.
In my scenario, I have option of using XSLT or VBscript.
Regards,
Jay Kinker__
"Pabba" wrote:
> Hi Jay,
>
> Copy the below code into a Custom Script Functoid and link the source
> "RootNode\Node1\Data" node as input and will output cumulative result
> to the target "Data" node. The C# code uses Global variable that
> appends each source record data but creates target record with each
> appended result.
>
> C# code:
>
> System.Text.StringBuilder GlobalString = new
> System.Text.StringBuilder();
>
> public System.Text.StringBuilder AddGlobalString(string param1)
> {
> GlobalString.Append(param1);
> return GlobalString;
> }
>
> Note: This generates multiple target Data nodes and the last Data node
> holds your expected output.
>
> Hope this helps, I can also provide you with custom Xslt code.
>
> Regards,
> Kiran Pabba
>
>
> Jay Kinker wrote:
>
>
|
|
|
|
|