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
AStreamFormatSupportimplementation for the XML stream format.This implementation requires a reference to the stream layout (i.e. the root
Selectorin 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.DocumentcreateBaseDocument(Selector layout)Creates a DOM made up of any group nodes in the parser tree.MarshallingContextcreateMarshallingContext(boolean streaming)Creates a new marshalling context.UnmarshallingContextcreateUnmarshallingContext()Creates a new ummarshalling context.voidsetGroupDepth(int groupDepth)voidsetLayout(Selector layout)Sets the stream layout.voidsetRecordParserFactory(RecordParserFactory recordParserFactory)Sets theRecordParserFactoryfor 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:StreamFormatCreates a new ummarshalling context.- Returns:
- the new
UnmarshallingContext
-
createMarshallingContext
public MarshallingContext createMarshallingContext(boolean streaming)
Description copied from interface:StreamFormatCreates 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:StreamFormatSupportSets theRecordParserFactoryfor creating record parsers.- Overrides:
setRecordParserFactoryin classStreamFormatSupport- Parameters:
recordParserFactory- theRecordParserFactory
-
setLayout
public void setLayout(Selector layout)
Sets the stream layout.- Parameters:
layout- the rootSelectornode 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
Documentmade up of group nodes
-
setGroupDepth
public void setGroupDepth(int groupDepth)
- Parameters:
groupDepth-
-
-