We used an XMLTemplater (2022.2) to generate an xml message using Excel file input with some optional columns.
The XML template contains some if structures like this :
{
if (fme:has-attribute("STATUS")) then
<Info>
<keyName>STATUS</keyName>
<value>{fme:get-attribute("STATUS")}</value>
</Info>
else()
}
The output xml is correct, but contains empty lines for every missing column, which we want to avoid.
Leaving out the else() clause is not allowed as it results in a parsing error.
How can we avoid those empty lines in the output xml ?