Hello everybody, i have mapped my sql server table to an xml schema and final output we are getting metadata of tables. To input related Foreignkey information inside metadata we have a field and we mapped it, problem is for many rows we dont have values, we have NULL. From current mapping values are coming and NULL values are creating empty elements in final xml file. Please see the screenshort. We want to delete the total bnr:foreignkey element for NULL values. Please correct my code if someone can help me. Thanks a lot. Looking forward.
Solved
Deleteing an XML element completely if the value is NULL in XML Templater?
Best answer by david_r
You can use an if-clause around the whole block, something like
{
if (not($fkey eq "")) then
<bnr:foreignKey>
...
</bnr:foreignKey>
else
""
}
The syntax is explained in the help under the heading "Root template":
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.