Finally getting only 1 line in the file, But i need to print all 3 lines in the file.

Based on the example you provided, it indicates a Record node. To display all lines, you need to map your data to a Record list rather than a single record — otherwise, only one line will appear.
Could you please share more details about the file you are trying to generate and which model mapping you are currently using? This will help us guide you more accurately.