XML Unmarshaller:
An unmarshaller deserializes XML stream to an object. there is the
org.springframework.oxm.Unmarshaller interface.
public interface Unmarshaller {
/**
* Unmarshals the given provided Source into an object graph.
*/
Object unmarshal(Source source) throws XmlMappingException, IOException;
}
Unmarshaller interface also has one method, which reads from the given javax.xml.transform.Source (an XML input abstraction), and returns the object read. As with Result, Source is a tagging interface that has three concrete implementations. Each wraps a different XML representation, as described below:
Source implementation |
Wraps XML representation |
DOMSource |
org.w3c.dom.Node |
SAXSource |
org.xml.sax.InputSource, and org.xml.sax.XMLReader |
StreamSource |
java.io.File, java.io.InputStream, or java.io.Reader |