Pentaho

 View Only

 extra content at end of document -xml/text file

  • Pentaho
  • Pentaho
archana garikapati's profile image
archana garikapati posted 06-26-2019 23:08

conversion from text file to xml file. getting extra space at end of file. 

pastedimage_1

pastedimage_2


#Pentaho
archana garikapati's profile image
archana garikapati

it works fine when i take the txt file and save it as xml and open 

archana garikapati's profile image
archana garikapati

it worked

Naveen Kumar's profile image
Naveen Kumar

Archana,

The file content is in XML, but the extension is in .txt; Simple and better way is to rename the extension (using file copy or SSH commands).

   Text file output adds an new line with no content, indicating the termination the last actual data record. So processing XML content in text file as single column data record generates the end XML file with new line in the last.

Not the ideal way, but this is a quick & dirty work-around/bodge.

In the text output, use the "Add Ending line of file" in "Content" tab to add comments for XML end line

say, <!--XML Details-->

The new line will be replaced with this comments; XML parsing would ignore the comments and this might solve the issue.

-Navn