*/
public String selection2xml(OCQueryResultSelection selection, int mode) throws JIException{
long s = System.currentTimeMillis();
StringBuffer rowsBuffer = new StringBuffer(2048);
StringBuffer mainBuffer = new StringBuffer(2048 + 256);
OCQueryResultColumnsCollection columns = selection.getColumns();
List<String> colNames = columns.getNames();
// add xml declaration
mainBuffer.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
int rowIndex = 0;