OutputStream out = null;
BufferedWriter rd = null;
boolean fl = true;
try {
File file = new File(filePath+"/"+fileName+".xml");
out=new FileOutputStream(file);
rd = new BufferedWriter(new OutputStreamWriter(out,"utf-8"));
rd.write(xmlString);
rd.close();
out.close();
} catch (IOException e) {
e.printStackTrace();
fl = false;
} finally {
if(rd!=null){
try {
rd.close();
} catch (IOException e) {
}
}
if(out!=null){
try {
out.close();
} catch (IOException e) {
}
}
}