public class

MarshallingSource

extends SAXSource
java.lang.Object
   ↳ javax.xml.transform.sax.SAXSource
     ↳ org.springframework.oxm.support.MarshallingSource

Class Overview

Source implementation that uses a Marshaller.Can be constructed with a Marshaller and an object to be marshalled.

Even though MarshallingSource extends from SAXSource, calling the methods of SAXSource is not supported. In general, the only supported operation on this class is to use the XMLReader obtained via getXMLReader() to parse the input source obtained via getInputSource(). Calling setXMLReader(XMLReader) or setInputSource(InputSource) will result in UnsupportedOperationExceptions.

See Also
  • javax.xml.transform.Transformer

Summary

[Expand]
Inherited Constants
From class javax.xml.transform.sax.SAXSource
Public Constructors
MarshallingSource(Marshaller marshaller, Object content)
Create a new MarshallingSource with the given marshaller and content.
Public Methods
Object getContent()
Return the object to be marshalled.
Marshaller getMarshaller()
Return the Marshaller used by this MarshallingSource.
void setInputSource(InputSource inputSource)
Throws a UnsupportedOperationException.
void setXMLReader(XMLReader reader)
Throws a UnsupportedOperationException.
[Expand]
Inherited Methods
From class javax.xml.transform.sax.SAXSource
From class java.lang.Object
From interface javax.xml.transform.Source

Public Constructors

public MarshallingSource (Marshaller marshaller, Object content)

Create a new MarshallingSource with the given marshaller and content.

Parameters
marshaller the marshaller to use
content the object to be marshalled

Public Methods

public Object getContent ()

Return the object to be marshalled.

public Marshaller getMarshaller ()

Return the Marshaller used by this MarshallingSource.

public void setInputSource (InputSource inputSource)

Throws a UnsupportedOperationException.

public void setXMLReader (XMLReader reader)

Throws a UnsupportedOperationException.