code: public void writeToFile(StringBuffer content, String filename) throws NoSuchPathException, IOException{
  		try {
  			FileWriter input = new FileWriter(filename);
  			input.write(content.toString(), 0, content.length());
  			input.flush();
  			input.close();
  		} catch (FileNotFoundException e) {
  			throw new NoSuchPathException(e);
  		}
  	}
docs: 将XML内容写入文件
  
  @param content XML内容
  @param filename 需要写入的文件
  
  @throws NoSuchPathException  写入文件时, 无法发现路径引发的异常
  @throws IOException 文件写入异常