code: public static String toStr(Document doc, String charset, boolean isPretty) {
  		final StringWriter writer = StrUtil.getWriter();
  		try {
  			write(doc, writer, charset, isPretty ? INDENT_DEFAULT : 0);
  		} catch (Exception e) {
  			throw new UtilException(e, "Trans xml document to string error!");
  		}
  		return writer.toString();
  	}
docs: 将XML文档转换为String<br>
  字符编码使用XML文档中的编码，获取不到则使用UTF-8
  
  @param doc XML文档
  @param charset 编码
  @param isPretty 是否格式化输出
  @return XML字符串
  @since 3.0.9