cancel
Showing results for 
Search instead for 
Did you mean: 

How To Remove Empty Node From Source XML

Former Member
0 Kudos

Hi,

How can I remove an empty node from the source xml in a XSLT mapping.

For e.g. If the source xml is like:

<SRC>

<Node1>SAP</Node2>

<Node2/>

<Node3>XI</Node3>

</SRC>

Then the xml should become:

<SRC>

<Node1>SAP</Node2>

<Node3>XI</Node3>

</SRC>

I need to do this because the output of my XSLT mapping is showing blank spaces for each blank node.

Thanks,

Abhishek.

Accepted Solutions (0)

Answers (2)

Answers (2)

prateek
Active Contributor
0 Kudos

Use <xsl:if>

Or else you may find different options here

http://www.dpawson.co.uk/xsl/sect2/N3328.html#d4804e304

Regards,

Prateek

Former Member
0 Kudos

hi

try to map with default value, soe const like 0

rgds

srini