Apr 30th, 2010, 01:05 PM
Writing results of differents steps in the same XML file
Can i incrementally write results of different steps in the same XML file without overwrite the existing file?
I realized that if the parameter "overwriteoutput" of itemWriter is not set to "false" and output file already exists, Spring threw an exception. Otherwise, if the referred parameter was set to "true", the output file is replaced.
May 5th, 2010, 12:48 PM
It is better to keep the semantics of the overwrite flag as they are I think. No-one ever asked for this append feature in XML before, and I guess it's not clear how useful it is in general. It would be practically impossible to write in an efficient way without sharing data between steps.
Can you write a step to concatenate the two files (that's what people do with flat files, which admittedly is easier)? If you can share the file position of the last element between the two steps it could be quite efficient.