Results 1 to 2 of 2

Thread: Writing results of differents steps in the same XML file

  1. #1
    Join Date
    Apr 2010
    Location
    Brazil
    Posts
    12

    Exclamation Writing results of differents steps in the same XML file

    Hello everbody,

    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.

    Thanks
    Fabiano

  2. #2
    Join Date
    Jun 2005
    Posts
    4,232

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •