mapping question
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server General > mapping question




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    mapping question  
MrFez


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-19-06 04:59 PM

hello, i'm new to biztalk and was wondering how to accomplish map repeating
elements in the source into different places in the destination.

I've got source xml something like:

<main>
<gift>bygender</gift>
<ele>
<childType>boy</childType>
<childToy>truck</childInfo>
<Comment>
<rem>comment1</rem>
</Comment>
</ele>
<ele>
<childType>girl</childType>
<childToy>doll</childToy>
</ele>
<ele>
<childType>notspecified</childType>
<childToy>book</childToy>
<Comment>
<rem>comment2</rem>
</Comment>
</ele>
</main>

and I want to map it to

<result>
<gifts>bygender</gifts>
<boysToy>truck</boysToy>
<boyComments>comment1</boyComments>
<girlsToy>doll<girlsToy>
<girlsComments><girlsComments>
<notspToy>book</notspToy>
<notspComments>comment2<notspComments>
</result>

In my map i use the = to check the value of childType and then I use the
value mapping functoid to map the data to the correct field. The problem I'm
having is   that it only seems to look at the first <ele></ele>.

How do I iterate thru all the <ele>?

Any help would be good.

Thanks.





[ Post a follow-up to this message ]



    Re: mapping question  
Eric Stott


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-21-06 08:09 AM

if you drag a line from <ele> record to the <result> record, I am assuming
that the <result> is not the root object, as there can only be one
occurrence of this object, and that <result> is set to be multiple occuring.

Eric
http://stottcreations.com/blog

"MrFez" <MrFez@discussions.microsoft.com> wrote in message
news:CE9F4BA1-4B0B-40BC-8EB7-93756E0F3807@microsoft.com...
> hello, i'm new to biztalk and was wondering how to accomplish map
> repeating
> elements in the source into different places in the destination.
>
> I've got source xml something like:
>
> <main>
>   <gift>bygender</gift>
>   <ele>
>      <childType>boy</childType>
>      <childToy>truck</childInfo>
>      <Comment>
>           <rem>comment1</rem>
>     </Comment>
>   </ele>
>   <ele>
>      <childType>girl</childType>
>      <childToy>doll</childToy>
>  </ele>
>   <ele>
>      <childType>notspecified</childType>
>      <childToy>book</childToy>
>      <Comment>
>           <rem>comment2</rem>
>      </Comment>
>  </ele>
> </main>
>
> and I want to map it to
>
> <result>
>    <gifts>bygender</gifts>
>    <boysToy>truck</boysToy>
>    <boyComments>comment1</boyComments>
>    <girlsToy>doll<girlsToy>
>    <girlsComments><girlsComments>
>    <notspToy>book</notspToy>
>    <notspComments>comment2<notspComments>
> </result>
>
> In my map i use the = to check the value of childType and then I use the
> value mapping functoid to map the data to the correct field. The problem
> I'm
> having is   that it only seems to look at the first <ele></ele>.
>
> How do I iterate thru all the <ele>?
>
> Any help would be good.
>
> Thanks.







[ Post a follow-up to this message ]



    Re: mapping question  
MrFez


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-21-06 08:10 AM

Thanks Eric.

The sample I posted above is a simplifed version of the actual source
schema.  There are several sections like <ele> which repeat and the <rem>
also repeats.  <main> is also a repeating node (nested under something else)
,
and they are all unbounded.

I've tried your suggestion and am getting an error along the lines of
"element cannot be empty or contain whitespaces".

I've also tried adding a looping functoid connecting the element <ele> and
the <result> and am getting some things repeating but not others.

Do anyone know if I have to use the iteration + index + looping functoid?
And if so, in what combination?



"Eric Stott" wrote:

> if you drag a line from <ele> record to the <result> record, I am assuming
> that the <result> is not the root object, as there can only be one
> occurrence of this object, and that <result> is set to be multiple occurin
g.
>
> Eric
> http://stottcreations.com/blog
>
> "MrFez" <MrFez@discussions.microsoft.com> wrote in message
> news:CE9F4BA1-4B0B-40BC-8EB7-93756E0F3807@microsoft.com... 
>
>
>





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 02:23 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register