SPLOpltionGenerator.java 文件源码

java
阅读 34 收藏 0 点赞 0 评论 0

项目:KeYExperienceReport 作者:
private static void writeOut(Document doc) throws TransformerException {
    TransformerFactory transformerFactory = TransformerFactory
            .newInstance();
    Transformer transformer = transformerFactory.newTransformer();
    transformer.setOutputProperty(OutputKeys.INDENT, "yes");
    transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
    transformer.setOutputProperty(OutputKeys.STANDALONE, "no");
    DOMSource source = new DOMSource(doc);
    File f = new File("splFile.xml");
    f.delete();
    StreamResult result = new StreamResult(f);

    // Output to console for testing
    // StreamResult result = new StreamResult(System.out);

    transformer.transform(source, result);

    System.out.println("File saved!");

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号