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
ARecordMarshallerimplementation 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.Stringmarshal(java.lang.Object record)Marshals a single record object to aString.protected java.lang.Stringmarshal(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 RecordIOExceptionDescription copied from interface:RecordMarshallerMarshals a single record object to aString.- Specified by:
marshalin 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.XMLStreamExceptionMarshals aDocument.- Parameters:
document- theDocumentto marshal- Returns:
- the marshalled record text
- Throws:
javax.xml.stream.XMLStreamException
-
-