codice:
Properties prop=new Properties();
ResultSetMetaData rsm=rs.getMetaData();
rs.next();//Necessario se il resultSet non è già sulla prima riga
for(int i=0;i<rsm.getColumnCount();i++){
String nomeColonna=rsm.getColumnName(i);
String value=rs.getString(i);
prop.setProperty(nome,value);
}
try{
FileOutputStream fos=new FileOutputStream(new File("db.prop"));
prop.store(fos,"Proprietà estratte dal db");
/*oppure in xml
FileOutputStream fos=new FileOutputStream(new File("db.xml"));
prop.storeToXml(fos,"proprietà estratte dal db in xml");
*/
}catch(IOException e){
e.printStackTrace();
}