`
xfxlch
  • 浏览: 167066 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

Transforming XML with XSLT

    博客分类:
  • Java
阅读更多
  public static void catalog() throws Exception{
    TransformerFactory factory = TransformerFactory.newInstance();
        Source xslt = new StreamSource(ClassLoader.getSystemResourceAsStream("fxclear/catalog.xslt"));
        Transformer transformer = factory.newTransformer(xslt);

        Source text = new StreamSource(ClassLoader.getSystemResourceAsStream("fxclear/catalog.xml"));
        transformer.transform(text, new StreamResult(new File("bin/catalog.xml")));
    System.out.println("catalog:::");
    }
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics