spring-framework / org.springframework.oxm.support / MarshallingSource

MarshallingSource

open class MarshallingSource : SAXSource

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 . Calling #setXMLReader(XMLReader) or #setInputSource(InputSource) will result in UnsupportedOperationExceptions.

Author
Arjen Poutsma

Since
3.0

See Also
javax.xml.transform.Transformer

Constructors

<init>

MarshallingSource(marshaller: Marshaller, content: Any)

Create a new MarshallingSource with the given marshaller and content.

Functions

getContent

open fun getContent(): Any

Return the object to be marshalled.

getMarshaller

open fun getMarshaller(): Marshaller

Return the Marshaller used by this MarshallingSource.

setInputSource

open fun setInputSource(inputSource: InputSource): Unit

Throws a UnsupportedOperationException.

setXMLReader

open fun setXMLReader(reader: XMLReader): Unit

Throws a UnsupportedOperationException.