velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Majji, Sashibhushan" <SMa...@carreker.com>
Subject Writing to File
Date Tue, 19 Apr 2005 18:28:55 GMT
Hi All, 

 I am creating a XML file using template. I am able to write the file record
by record 
 but the requirement is to write all the records one after one with giving
new line 
  
 example code 
 ------------ 

 $template.getStrValue($header) 
 #set( $count = $count + 1 ) 
 $count 
 ....... 

 We can write the template as 

 $template.getStrValue($header)$count, so that it will write the file with
out new line. 
 But I am doing several calculations where I need to write several #set()
conditions which forcing 
 to write the record to new line. 

 If I try this 

 $template.getStrValue($header)#set( $count = $count + 1 )$count 

 The output is not correct 


Thanks 
Sashi 


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message