code: public static void saveXML(Document document, File file) {
  		OutputFormat format = OutputFormat.createPrettyPrint();
  		XMLWriter xmlWriter = null;
  		try {
  
  			xmlWriter = new XMLWriter(new FileOutputStream(file), format);
  			xmlWriter.write(document);
  
  		} catch (Exception e) {
  			throw new RuntimeException(e);
  		} finally {
  			if (xmlWriter != null) {
  				try {
  					xmlWriter.close();
  				} catch (IOException e) {
  					throw new RuntimeException(e);
  				}
  			}
  		}
  	}
docs: 将指定内存中的DOCUMENT文档对象存储到硬盘上
  
  @param document
  指定一个内存中的Document文档对象
  @param file
  指定存储路径