Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
For those applications which use XML as the message format, the framework provides support in converting a POJO to XML and vice versa automatically. There’s a bit more involved than simply using an XML tag, as we see in the above built-in transformers. If you have already worked with Spring’s Object-to-XML (OXM) framework, this section will be easy.
Spring uses two classes to marshal and unmarshal the Object into
XML and vice versa: the
org.springframework.oxm.Marshaller and the
org.springframework.oxm.Unmarshaller.
The Marshaller is used to convert an Object to an XML Stream, while the
Unmarshaller does the opposite—converting an XML stream to an
Object.