public abstract class CsvToXmlServiceImpl extends CsvXmlTransformImpl
CSV_FIELD_NAME, CSV_RECORD_NAME, XML_ROOT_ELEMENT
log
CONFIRMATION_ID_KEY
Constructor and Description |
---|
CsvToXmlServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected org.w3c.dom.Element |
addNewElement(org.w3c.dom.Document doc,
org.w3c.dom.Element parent,
java.lang.String name) |
protected org.w3c.dom.Node |
createTextNode(org.w3c.dom.Document doc,
java.lang.String value) |
void |
doService(AdaptrisMessage msg) |
FormatBuilder |
getFormat() |
java.lang.Boolean |
getStripIllegalXmlChars() |
void |
setFormat(FormatBuilder csvFormat) |
void |
setStripIllegalXmlChars(java.lang.Boolean s)
Specify whether or not to strip illegal XML characters from all the data before converting to XML.
|
protected boolean |
stripIllegalXmlChars() |
protected abstract org.w3c.dom.Document |
transform(AdaptrisMessage msg) |
protected void |
writeXmlDocument(org.w3c.dom.Document doc,
AdaptrisMessage msg)
Helper method to write the XML document to the AdaptrisMessage taking into account any encoding requirements.
|
closeService, evaluateEncoding, getIncludeLineNumberAttribute, getOutputMessageEncoding, includeLineNumberAttribute, initService, prepare, setIncludeLineNumberAttribute, setOutputMessageEncoding
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsConfirmation, getIsTrackingEndpoint, getLookupName, getUniqueId, init, isBranching, isConfirmation, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, rethrowServiceException, retrieveComponentState, setContinueOnFail, setIsConfirmation, setIsTrackingEndpoint, setLookupName, setUniqueId, start, stop
public void doService(AdaptrisMessage msg) throws ServiceException
ServiceException
protected abstract org.w3c.dom.Document transform(AdaptrisMessage msg) throws ServiceException
ServiceException
public FormatBuilder getFormat()
public void setFormat(FormatBuilder csvFormat)
public java.lang.Boolean getStripIllegalXmlChars()
public void setStripIllegalXmlChars(java.lang.Boolean s)
The following regular expression is used to strip out all invalid XML 1.0 characters :
"[^ \r\n --�𐀀-]"
.
s
- true to enable stripping, default is null (true)protected boolean stripIllegalXmlChars()
protected org.w3c.dom.Node createTextNode(org.w3c.dom.Document doc, java.lang.String value)
protected org.w3c.dom.Element addNewElement(org.w3c.dom.Document doc, org.w3c.dom.Element parent, java.lang.String name)
protected void writeXmlDocument(org.w3c.dom.Document doc, AdaptrisMessage msg) throws java.lang.Exception
doc
- the XML documentmsg
- the AdaptrisMessagejava.lang.Exception