I have to generate a lot of xml snippets and store the into my database for later (re-)use. JaxB works fine, but i some questions came up:
I want to keep the boilerplate code as small as possible.
greetings m
PS: XStream worked fine too, but i want to stick to the standards.
You can always inject marshaller. (Best way is to use Spring)
<bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
<property name="classesToBeBound">
<list>
<value>com.package.YourClass</value>
</list>
</property>
</bean>
I don't properly understand what you mean be "sticking to standards", but you could give a look at JIBX. It generally provides better performance than JaxB