How to transform XML with XSL using Java

后端 未结 4 1173
面向向阳花
面向向阳花 2021-01-21 15:54

I am currently using the standard javax.xml.transform library to transform my XML to CSV using XSL. My XSL file is large - at around 950 lines. My XML files can be quite large

4条回答
  •  长发绾君心
    2021-01-21 16:52

    Use saxon. offtop: if you use the same stylesheet to transform many XML files, you might want to consider templates (pre-compiled stylesheets):

    javax.xml.transform.Templates style = tFactory.newTemplates(xslSource);
    style.newTransformer().transform(...);
    

提交回复
热议问题