jberet-support contains reader and writers for flat files and xml files (see jberet-support javadocs):
So you can use BeanIOItemReader for reading from flat files and XmlItemWriter for writing to xml output. jberet-support tests directory should have tests for how to use BeanIOItemReader and XmlItemWriter. For BeanIO reader, you will need to create a mapping file (required by BeanIO) to detail how to map input data fields to model object fields.
Example BeanIO mapping files:
Since the mapping is offloaded to the mapping file, the job.xml file for BeanIO reader is relatively simple:
XmlItemWriter uses jackson libraries behind the scene, and usually it can automatically generate xml document from your mode objects (e.g., Person.class, Employee.class, etc). In some cases, you will need to add a few jackson annotations to your model class to help the conversion.
Example xmlItemWriter job.xml:
there is no automatical way to write an object to xml based on its xsd. If you use jberet-support xmlItemWriter, the mapping happens in your model class in the form of jackson and/or jaxb mapping annotations.