I have aspring batch job that use an StaxeventItemWriter , it's works fine . I want the result Xml file to be formatted , how can I do that . is there any property like ? this is my ItemWriter , I put only the relevant part of my code to simplify , if needed I can add the hole job.thanks
<bean id="xmlWriter" class="org.springframework.batch.item.xml.StaxEventItemWriter">
<property name="resource" value="file:src/main/resources/myFile.xml"></property>
<property name="rootTagName" value="Users"></property><bean id="MyMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
<property name="classesToBeBound">
<list>
<value>model.myModel</value>
</list>
</property>
</bean>
<property name="marshaller" ref="MyMarshaller"></property>
</bean>
<bean id="MyMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
<property name="classesToBeBound">
<list>
<value>model.myModel</value>
</list>
</property>
</bean>