String[] columnNames = new String[columnCount];
Element names = document.createElement("names");
for (inti = 0; i < columnCount; i++){
/* the first column is 1, the second is 2, ...
*/
columnNames[i] = rsmd.getColumnName(i + 1);
Element nextNameNode = document.createElement("name");
Text nextName = document.createTextNode(columnNames[i]);
nextNameNode.appendChild(nextName);
names.appendChild(nextNameNode);
}