DatabaseRecord dr = new DatabaseRecord();
dr.add(new DatabaseField(RESULT_STR), value);
records.add(dr);
}
SimpleXMLFormatModel simpleXMLFormatModel = new SimpleXMLFormatModel();
XMLConversionManager conversionManager =
(XMLConversionManager) xrService.getOXSession().getDatasourcePlatform().getConversionManager();
for (DatabaseRecord dr : records) {
Element rowElement = TEMP_DOC.createElement(tempXMLTag);
for (DatabaseField field : (Vector<DatabaseField>)dr.getFields()) {
Object fieldValue = dr.get(field);
if (fieldValue != null) {
if (fieldValue instanceof Calendar) {
Calendar cValue = (Calendar)fieldValue;
fieldValue = conversionManager.convertObject(cValue, STRING, DATE_TIME_QNAME);
}
if (fieldValue instanceof Date) {
Date dValue = (Date)fieldValue;
fieldValue = conversionManager.convertObject(dValue, STRING, DATE_QNAME);
} else if (fieldValue instanceof Time) {
Time tValue = (Time)fieldValue;
fieldValue = conversionManager.convertObject(tValue, STRING, TIME_QNAME);
} else if (fieldValue instanceof Timestamp) {
Timestamp tsValue = (Timestamp)fieldValue;
fieldValue = conversionManager.convertObject(tsValue, STRING, DATE_TIME_QNAME);
} else if (fieldValue instanceof Blob) {
fieldValue = conversionManager.convertObject((Blob) fieldValue, ClassConstants.APBYTE);
} else if (fieldValue.getClass().getName().equalsIgnoreCase(ORACLESQLXML_STR)) {
// handle XMLType case where an oracle.jdbc.driver.OracleSQLXML instance was returned
try {
Class oracleSQLXML;
Method getStringMethod;