Package org.beanio.stream.xml
Class XmlRecordMarshaller
- java.lang.Object
-
- org.beanio.stream.xml.XmlRecordMarshaller
-
- All Implemented Interfaces:
RecordMarshaller
public class XmlRecordMarshaller extends java.lang.Object implements RecordMarshaller
ARecordMarshaller
implementation for XML formatted records.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description XmlRecordMarshaller()
Constructs a newXmlRecordMarshaller
.XmlRecordMarshaller(XmlParserConfiguration config)
Constructs a newXmlRecordMarshaller
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
marshal(java.lang.Object record)
Marshals a single record object to aString
.protected java.lang.String
marshal(org.w3c.dom.Document document)
Marshals aDocument
.
-
-
-
Constructor Detail
-
XmlRecordMarshaller
public XmlRecordMarshaller()
Constructs a newXmlRecordMarshaller
.
-
XmlRecordMarshaller
public XmlRecordMarshaller(XmlParserConfiguration config)
Constructs a newXmlRecordMarshaller
.- Parameters:
config
- theXmlParserConfiguration
-
-
Method Detail
-
marshal
public java.lang.String marshal(java.lang.Object record) throws RecordIOException
Description copied from interface:RecordMarshaller
Marshals a single record object to aString
.- Specified by:
marshal
in interfaceRecordMarshaller
- Parameters:
record
- the record object to marshal- Returns:
- the marshalled record text
- Throws:
RecordIOException
-
marshal
protected java.lang.String marshal(org.w3c.dom.Document document) throws javax.xml.stream.XMLStreamException
Marshals aDocument
.- Parameters:
document
- theDocument
to marshal- Returns:
- the marshalled record text
- Throws:
javax.xml.stream.XMLStreamException
-
-