title: XML marshalling in Spring Batch
body: <p>I have a JdbcCursorItemReader which reads from a database and uses a row mapper to turn the resultset into an object. The requirement is now to marshall the object into XML, which must then be placed onto a message queue.</p>
  
  <p>Three questions:</p>
  
  <p><strong>1.</strong> Should a marshaller in Spring Batch be implemented as an ItemProcessor or as an ItemWriter?</p>
  
  <p><strong>2.</strong> There is no need to write the XML to a file, but rather simply send it as a string object in a message. What is the best way in Spring Batch to do this?</p>
  
  <p><strong>3.</strong> If the marshaller and message dispatcher should both be implemented as separate writers, how is it possible to chain them.</p>
  
  <p>Any example code or links would be very appreciated.</p>
  
  <p>Thanks</p>