try {
if (this.outputFactory == null) {
this.outputFactory = XMLOutputFactory.newInstance();
}
return new StAXResult(this.outputFactory
.createXMLEventWriter(setCharacterStreamInternal()));
} catch (XMLStreamException ex) {
SQLException sqlEx = SQLError.createSQLException(ex
.getMessage(), SQLError.SQL_STATE_ILLEGAL_ARGUMENT, this.exceptionInterceptor);
sqlEx.initCause(ex);