Skip to Content
avatar image
Former Member

Mapping Problem: Create target node if child element is not having data

Hi All,

I can any one guide in following mapping problem:

Create target node if child element is not having data.

Source structure with data:

   <data>
      -<item>        
        --<SupplierN>01</SupplierN>
     - </item>
      -<item>        
         --<SN/>
      -</item>
      -<item>        
         --<SupplierN>03</SupplierN>
      -</item>
   </data>

Desired Target structure with data:

   <data>
      -<item>        
        --<SupplierN>01</SupplierN>
     - </item>
      -<item>        
         --<SupplierN>03</SupplierN>
      -</item>
   </data>

When I am using Create IF then my target structure is coming like below,

i.e. blank item node is coming(So my query is how can we remove blank target node in mapping?

http://picasaweb.google.com/rohilla.umesh/UntitledAlbum#5533264587094880578

   <data>
      -<item>        
        --<SupplierN>01</SupplierN>
     - </item>
      -<item />       
      -<item>        
         --<SupplierN>03</SupplierN>
      -</item>
   </data>

And if i am passing like below: No output is generating:

   <data>
      -<item>        
        --<SupplierN/>
     - </item>
      -<item>        
         --<SupplierN>03</SupplierN>
      -</item>
   </data>

Thanks & Regards

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Oct 29, 2010 at 02:08 AM

    Hi.

    Tried this.

    SupplierN-----mapwithdefault......

    constan "blank"--


    > equalS-->removeContext>not----->if ( ifwithoutelse) -


    >item

    constant "blank"----


    then

    or more simply

    SupplierN-----mapwithdefault......

    constan "blank"--


    > equalS-->removeContext>not-----createif -


    >item

    Edited by: Luis Ortiz on Oct 28, 2010 9:11 PM

    Add comment
    10|10000 characters needed characters exceeded