public static String doc2String(Document document) {
		String s = "";
		try {
			// ʹת
			ByteArrayOutputStream out = new ByteArrayOutputStream();
			// ʹUTF-8
			OutputFormat format = new OutputFormat(" ", true, "UTF-8");
			XMLWriter writer = new XMLWriter(out, format);
			writer.write(document);
			s = out.toString("UTF-8");
		} catch (Exception ex) {
			ex.printStackTrace();
		}
		return s;
	}