Transformation problems..

Home Page Forums BizTalk 2004 – BizTalk 2010 Transformation problems..

Viewing 1 reply thread
  • Author
    Posts
    • #17941

      If I have an xml document that looks like this:

      <Top>
          <Child>
              <SomeElement />
              <AChildRecord><Data></Data><MoreData></MoreData><AChildRecord>
              <SomeOtherElement />
         </Child> 
          <Child>
              <SomeElement />
              <AChildRecord><Data></Data><MoreData></MoreData><AChildRecord>
              <SomeOtherElement />
         </Child>
      </Top>

       

      My problem is that the <AChildRecord> is the same for all <Child> record. But I only want to map it once. E.g you get something like this:

      MappedAChildRecord
      MappedChild1
      MappedChild2
      MappedChild3.. 

      Not like this (the way I get it now):

      MappedAChildRecord
      MappedAChildRecord
      MappedAChildRecord
      MappedChild1
      MappedChild2
      MappedChild3..

       I don't know if I'm explaining this well enough. But basically in the xml format I want to transform to <Child> and <AChildRecord> are sibblings. And since I know AChildRecord will be the same for ALL <Child> I only want it once, while I want all of the <Child> tags. Does that make sense?

    • #17975

      Quick suggestion…

      Can you map to something like this?   <AChildRecord> Min=1, Max=1, <Child> Min=1, Max=unbounded.

      <Top>

         <AChildRecord>
         <Child>
            <SomeElement />
              <Data></Data><MoreData></MoreData><AChildRecord>
            <SomeOtherElement />
         </Child> 
         <Child>
            <SomeElement />
              <Data></Data><MoreData></MoreData><AChildRecord>
            <SomeOtherElement />
         </Child>
      </Top>

      • #18030

        Hi,

         Thanks. I ended up having to go the 'correct' route. Introduced a new object in the domain model so that we had the correct Parent->Child structure instead of Child->Parent like in the above example.

         

         

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.