cancel
Showing results for 
Search instead for 
Did you mean: 

How to eliminate empty tags in out put XML file in IDOC to File scenario

Former Member
0 Kudos

Hi Experts,

I am doing IDOC to File scenario.

My Out put XML is in to FTP is as below

<ITEMS>

<item>

<A>asdf<A>

<B>GHIJ<B>

</item>

<item>

<A>123<A>

<B>G098<B>

</item>

</ITEMS>

<ITEMS/> -


> Means no data

<ITEMS/> -


> Means no data

<ITEMS>

<item>

<A>yyy<A>

<B>zzz<B>

</item>

<item>

<A>arrr<A>

<B>Ghhh<B>

</item>

</ITEMS>

Now I want to eliminate tages <ITEMS/> in out out put XML file ( PIwhich writes in File server).

1) Is there any setting in communication channel to do this

2) Is there any settings in Mapping proram to suppress parent tag if child tags are not available.

I want output as below .

<ITEMS>

<item>

<A>asdf<A>

<B>GHIJ<B>

</item>

<item>

<A>123<A>

<B>G098<B>

</item>

</ITEMS>

<ITEMS>

<item>

<A>yyy<A>

<B>zzz<B>

</item>

<item>

<A>arrr<A>

<B>Ghhh<B>

</item>

</ITEMS>

Thanks,

Subbu

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

items->mapwithdefalut(just empty in the value)-> euqals(check with empty constant)->not->createif->target node

and make sure that as Ravi kanth said ...occurance is min is 0 at target side

Regards,

Prasad.

Edited by: PRASAD KONDA on May 21, 2009 1:50 PM

former_member181962
Active Contributor
0 Kudos

Hi,

Did you try keeping a CreateIf Condition for your Items Node in your mapping?

Also check if the occurance of the Items node is 0:unbounded.

Regards,

Ravi Kanth Talagana