code: public static void saveReport(String xml, String path) {
  		FileOutputStream fos = null;
  		try {
  			fos = new FileOutputStream(path);
  			fos.write(xml.getBytes("UTF-8"));
  			fos.flush();
  		} catch (Exception ex) {
  			LOG.error(ex.getMessage(), ex);
  			ex.printStackTrace();
  		} finally {
  			if (fos != null) {
  				try {
  					fos.close();
  				} catch (IOException e) {
  					e.printStackTrace();
  				}
  			}
  		}
  	}
docs: Write a xml text to a file at specified path
  
  @param xml
  xml text
  @param path
  file path