public class XmlStreamFormat extends StreamFormatSupport
StreamFormatSupport
implementation for the XML stream format.
This implementation requires a reference to the stream layout (i.e. the root Selector
in the parser tree). The layout is not modified in any way allowing this class to be thread
safe.
Constructor and Description |
---|
XmlStreamFormat()
Constructs a new XmlStreamFormat.
|
Modifier and Type | Method and Description |
---|---|
protected Document |
createBaseDocument(Selector layout)
Creates a DOM made up of any group nodes in the parser tree.
|
MarshallingContext |
createMarshallingContext(boolean streaming)
Creates a new marshalling context.
|
UnmarshallingContext |
createUnmarshallingContext()
Creates a new ummarshalling context.
|
void |
setGroupDepth(int groupDepth) |
void |
setLayout(Selector layout)
Sets the stream layout.
|
void |
setRecordParserFactory(RecordParserFactory recordParserFactory)
Sets the
RecordParserFactory for creating record parsers. |
createRecordMarshaller, createRecordReader, createRecordUnmarshaller, createRecordWriter, getName, getRecordParserFactory, setName
public UnmarshallingContext createUnmarshallingContext()
StreamFormat
UnmarshallingContext
public MarshallingContext createMarshallingContext(boolean streaming)
StreamFormat
streaming
- true if marshalling to a streamMarshallingContext
public void setRecordParserFactory(RecordParserFactory recordParserFactory)
StreamFormatSupport
RecordParserFactory
for creating record parsers.setRecordParserFactory
in class StreamFormatSupport
recordParserFactory
- the RecordParserFactory
public void setLayout(Selector layout)
layout
- the root Selector
node in the parser treeprotected Document createBaseDocument(Selector layout)
Document
made up of group nodespublic void setGroupDepth(int groupDepth)
groupDepth
-