One Star

removing blank columns from a row

I want to remove blank columns from a row, how is this possbile?
so lets say my row coming in from an xml file looks like this:
<row>
<name>tom</name>
<age>24 </age>
<sex/>
</row>
i read it in and i want to remove the sex column as its blank. how can this be done so that my ouput to an xml file looks like this:
<name>tom</name>
<age>24</age>
4 REPLIES
Community Manager

Re: removing blank columns from a row

Hello
There is an otpion 'Create empty element if needed' on advanced settings panel of tAdvancedFileOutputXML, uncheck this option to remove the empty element.
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: removing blank columns from a row

Hi,
I did that and its unchecked on another job I have and it doesnt work, it still prints out the element like this:
<cameraType></cameraType>
<ParentList/>
One Star

Re: removing blank columns from a row

How to remove the blank tag from the XML?
I have unchecked the checkbox which was present in the settings of tAdvanceOutputXml i,e; create empty element if needed. But still empty tag is occuring.
One thing i noticed that the tag which appeared <ParentList/> in this format works fine after unchecking the text box but the tag which is like <ParentList></ParentList> still comes.
Please guide how to handle this.
Community Manager

Re: removing blank columns from a row

Hello
One thing i noticed that the tag which appeared <ParentList/> in this format works fine after unchecking the text box but the tag which is like <ParentList></ParentList> still comes.

I tested and found that this option is invalid now. Please report a bug on our bugtracker.
Thanks for your support!!!
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business