Class TextFromElementDataSource

java.lang.Object
org.apache.axis2.format.TextFromElementDataSource
All Implemented Interfaces:
DataSource

public class TextFromElementDataSource extends Object implements DataSource
Data source that represents the text of a given OMElement.

The expression

new TextFromElementDataSource(element, charset, contentType)
produces a DataSource implementation that is equivalent to
new ByteArrayDataSource(element.getText().getBytes(charset), contentType)
but that is more efficient.