java创建xml文档
来源:百度知道 编辑:UC知道 时间:2024/05/16 13:59:24
stmt.execute(SQL);
RS = stmt.getResultSet();
while (RS == null && stmt.getMoreResults())
{
RS = stmt.getResultSet();
}
OutputStream os = new FileOutputStream(new File(file));
OutputStreamWriter osw = new OutputStreamWriter(os);
InputStream is = null;
InputStreamReader isr = null;
int c;
osw.write("<?xml version=\"1.0\"?>");
osw.write("<root>");
while (RS.next())
{