public class StaxRecordWriter
extends java.lang.Object
| Constructor and Description |
|---|
StaxRecordWriter()
create default instance.
|
StaxRecordWriter(boolean printPretty) |
| Modifier and Type | Method and Description |
|---|---|
protected static java.lang.String |
cleanText(java.lang.String text) |
void |
writeRecord(javax.xml.stream.XMLStreamWriter staxWriter,
Record record)
Append a rec:Record element describing the given record to the given XML stream.
|
void |
writeRecordList(javax.xml.stream.XMLStreamWriter staxWriter,
java.lang.Iterable<Record> records)
Append a rec:RecordList element describing the given record list to the given XML stream.
|
public StaxRecordWriter()
public StaxRecordWriter(boolean printPretty)
printPretty - set to true to add newlines after each element tag.public void writeRecord(javax.xml.stream.XMLStreamWriter staxWriter,
Record record)
throws javax.xml.stream.XMLStreamException
staxWriter - target XML streamrecord - the record to writejavax.xml.stream.XMLStreamException - StAX errorpublic void writeRecordList(javax.xml.stream.XMLStreamWriter staxWriter,
java.lang.Iterable<Record> records)
throws javax.xml.stream.XMLStreamException
staxWriter - target XML streamrecords - the record list to transform.javax.xml.stream.XMLStreamException - StAX errorprotected static java.lang.String cleanText(java.lang.String text)
text - input text (XML)