docs: public static void toFile(Document doc, String path, String charset) {
  		if (StrUtil.isBlank(charset)) {
  			charset = doc.getXmlEncoding();
  		}
  		if (StrUtil.isBlank(charset)) {
  			charset = CharsetUtil.UTF_8;
  		}
  
  		BufferedWriter writer = null;
  		try {
  			writer = FileUtil.getWriter(path, charset, false);
  			write(doc, writer, charset, INDENT_DEFAULT);
  		} finally {
  			IoUtil.close(writer);
  		}
  	}