Class XmlStreamFormat
- java.lang.Object
-
- org.beanio.internal.parser.StreamFormatSupport
-
- org.beanio.internal.parser.format.xml.XmlStreamFormat
-
- All Implemented Interfaces:
StreamFormat
public class XmlStreamFormat extends StreamFormatSupport
AStreamFormatSupport
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.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description XmlStreamFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.w3c.dom.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 theRecordParserFactory
for creating record parsers.-
Methods inherited from class org.beanio.internal.parser.StreamFormatSupport
createRecordMarshaller, createRecordReader, createRecordUnmarshaller, createRecordWriter, getName, getRecordParserFactory, setName
-
-
-
-
Method Detail
-
createUnmarshallingContext
public UnmarshallingContext createUnmarshallingContext()
Description copied from interface:StreamFormat
Creates a new ummarshalling context.- Returns:
- the new
UnmarshallingContext
-
createMarshallingContext
public MarshallingContext createMarshallingContext(boolean streaming)
Description copied from interface:StreamFormat
Creates a new marshalling context.- Parameters:
streaming
- true if marshalling to a stream- Returns:
- the new
MarshallingContext
-
setRecordParserFactory
public void setRecordParserFactory(RecordParserFactory recordParserFactory)
Description copied from class:StreamFormatSupport
Sets theRecordParserFactory
for creating record parsers.- Overrides:
setRecordParserFactory
in classStreamFormatSupport
- Parameters:
recordParserFactory
- theRecordParserFactory
-
setLayout
public void setLayout(Selector layout)
Sets the stream layout.- Parameters:
layout
- the rootSelector
node in the parser tree
-
createBaseDocument
protected org.w3c.dom.Document createBaseDocument(Selector layout)
Creates a DOM made up of any group nodes in the parser tree.- Returns:
- the new
Document
made up of group nodes
-
setGroupDepth
public void setGroupDepth(int groupDepth)
- Parameters:
groupDepth
-
-
-