title: Spring Batch Writing as complex XML output
body: <p>I am new to Spring Batch and I have to design a task which reads from database and write the data in to multiple XMLs the output format is as follows</p>
  
  <pre><code>    &lt;Records xmlns"somevalue" ...&gt;
    &lt;Version&gt;1.0&lt;/Version&gt;
    &lt;SequenceNo&gt;1&lt;/SeqeunceNo&gt;
    &lt;Date&gt;12/12/2012 12:12:12 PM&lt;Date&gt;
    &lt;RecordCount&gt;100&lt;/RecordCount&gt;&lt;!--This is total number of Update and Insert txns--&gt;
    &lt;SenderEmail&gt;asds@asds.com&lt;/SenderEmail&gt;
    &lt;Transaction type="Update"&gt;
      &lt;TxnNo&gt;1&lt;/TxnNo&gt;
      &lt;Details&gt;
        &lt;MoreDetails&gt;
        &lt;/MoreDetails&gt;
      &lt;/Details&gt;
    &lt;/Transaction&gt;
    &lt;Transaction type="Insert"&gt;
      &lt;TxnNo&gt;2&lt;/TxnNo&gt;
      &lt;Details&gt;
        &lt;MoreDetails&gt;
        &lt;/MoreDetails&gt;
      &lt;/Details&gt;
    &lt;/Transaction&gt;
    &lt;Transaction type="Update"&gt;
    &lt;/Transaction&gt;
    &lt;Transaction type="Update"&gt;
    &lt;/Transaction&gt;
  &lt;/Records&gt;
  </code></pre>
  
  <p>Please suggest what unmarshaller should I use and how to start on this. Eventually later I have to convert it to multithreading for optimization and performance.</p>