cancel
Showing results for 
Search instead for 
Did you mean: 

empty tags

Former Member
0 Kudos

Hi,

My output in PI contains empty tags. Like <sample/>

I want that PI doesnt include them. Delete them entirerly if they are empty. Also for attributes. if they are empty they shouldn't be printed.

now its printing like this: <sample att="" />

Can you help.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Answers (3)

Answers (3)

Former Member
0 Kudos

You can place a condition if " EXISTS(node function ) and then check if not equal to "" then pass the original value.(USING IF -Then function).

If there is no mapping available for that particular fields Disable the field mapping.

Regards,

Sainath Chutke

jagdishwar_b
Active Participant
0 Kudos

in your receiver data-type, all those elements/tags that could possibly be empty, declare those elements as optional.. indicating 0..1 or 0..unbounded as occurences.

use a java mapping not to include those tags when they are empty.

stefan_grube
Active Contributor
0 Kudos

It would be helpful, if you describe your scenario.