Package org.apache.axiom.om
Interface OMDataSource
- All Known Subinterfaces:
OMDataSourceExt
- All Known Implementing Classes:
ByteArrayDataSource,CharArrayDataSource,InputStreamDataSource,OMDataSourceExtBase,ParserInputStreamDataSource,WrappedTextNodeOMDataSourceFromDataSource,WrappedTextNodeOMDataSourceFromReader
public interface OMDataSource
Interface to arbitrary source of XML element data. This provides the hook for using a general
data source (such as data binding frameworks) as the backing source of data for an element.
-
Method Summary
Modifier and TypeMethodDescriptionGet parser for element data.voidserialize(OutputStream output, OMOutputFormat format) Serializes element data directly to stream.voidserialize(Writer writer, OMOutputFormat format) Serializes element data directly to writer.voidserialize(XMLStreamWriter xmlWriter) Serializes element data directly to StAX writer.
-
Method Details
-
serialize
Serializes element data directly to stream.- Parameters:
output- destination stream for element XML textformat- Output format information. The implementation must use this information to choose the correct character set encoding when writing to the output stream. This parameter must not be null.- Throws:
XMLStreamException
-
serialize
Serializes element data directly to writer.- Parameters:
writer- destination writer for element XML textformat- output format information (nullif none; may be ignored if not supported by data binding even if supplied)- Throws:
XMLStreamException
-
serialize
Serializes element data directly to StAX writer.- Parameters:
xmlWriter- destination writer- Throws:
XMLStreamException
-
getReader
Get parser for element data. In the general case this may require the data source to serialize data as XML text and then parse that text.- Returns:
- element parser
- Throws:
XMLStreamException
-