TIS 3.1.3.
I have an input csv file with empty fields that I want to convert to xml. How do I get tFileOutputXML not to output empty tags or in a more advanced case tFileOutputMSXML ( I unchecked Create empty element if needed but it made no difference). The generated Java code appears to only check for null values not empty values.
If it works in TOS3.2.0.M3, I think it's probably a bug in 3.1.3 which has been resolved. I'm now able to reproduce the issue in TOS 3.1.3. The problem seems to appear when there are null values in other sections than the loop one. When I first try it today, I had null values only in the loop section, that's why everything worked fine. Does anyone have any info about this? Regards, Karine
What you mean by null and emply?
Are those different?
null is understood by java language but empty does not have any meaning in java. Might be for humans, empty has some meaning.
The generated Java code appears to only check for null values not empty values.
Values that have no content i.e. empty. So in the delimited file a field has no content but in not treated by Java as null. So the Java code needs to test String s = ... if (s == null || s.equals(""))...
I guess there might be some blank characters in those fields. Could you please try by trimming the field(String type). Thanks and Regards, Pravu Mishra.
Hi janhess,
Have you tried to replace "" with null? You can use a tReplace between the tFileInputDelimited and the tFileOutputMSXML, and uncheck the "create emty element if needed" option.
Regards,
Karine