Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Could you please help me with this issue:
As per the XML schema, Location, CountryCode, Number and Extension are all mandatory fields when the Phone block is use. But I don't have Extension information is not available. How to make the extension tag to always even when it is blank. like sample below.
<Phone>
<Location>home</Location>
<CountryCode>1</CountryCode>
<Number>41633331</Number>
<Extension></Extension>
</Phone>
My flow is built in Talend to extract the data and convert to XML. I am using tmap and tAdvancedFileoutputXML. How will I be able to use this tool?
Hi
On the tAdvancedFileOutputXML properties, Advanced Settings tab, ensure the tick box "Create empty element if needed" is ticked.
Thanks
David
I did try this and it is turning on for all the elements. I only want this <Extension></Extension> to show empty, for the rest I don't want them showing when null
Hi
Try to convert null value of extension column to empty string on tMap before tAdvancedFileOutputXML.
row1.extension==null?"":row1.extension
and uncheck the 'Create empty element if needed' box.
Regards
Shong
Thank you for your help. This is working
Thanks you for your help. This is working.