Remove Empty Tag from an XML input

Hello All,

I am having a requirement to remove empty tag from input XML string. e.g.

if my input is like :


then output would be like:


Did anyone face the same issue earlier. Anyhelp would be appreciated.


I would say to do a XQL query like in your case:


and see if any value return, if it does then map it to your documentType and convert it back to XML. You have to do this for each tag.

Another approach to this kind of problem is to use conditional mapping. Create a document reference as output and map the input to the output using conditional mapping. As in this situation, set “Evaluate copy condition” true, fill “Copy condition” with:




Easy way to do it is just use replaceString(), find the required and replace it…