⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xsltmanager.java

📁 此程序都是企业级 的数据库开发程序 全面揭示了JAVA对数据库的操作
💻 JAVA
字号:
package mvc;/* These classes are found in the Xerces jar file (Xerces.jar) */import org.w3c.dom.Document;/* * These classes are part of the J2EE jar file or if you are using JBoss/tomcat * the servlet.jar file found in your Tomcat/lib directory. */import javax.servlet.jsp.JspWriter;/* Imported from the Xalan.jar */import javax.xml.transform.TransformerFactory;import javax.xml.transform.Transformer;import javax.xml.transform.stream.StreamResult;import javax.xml.transform.stream.StreamSource;import org.apache.xalan.processor.TransformerFactoryImpl;import javax.xml.transform.dom.DOMSource;public class XSLTManager {  /*   * The transformOutput method will transform an XML Document and XSL stylesheet   * into HTML and then write the HTML out to the JspWrite passed into the method   * call.   */  public void transformOutput(JspWriter _out, Document _xmlDoc,                               String _xslFileName) throws Exception {    TransformerFactory tFactory = new TransformerFactoryImpl();    Transformer transformer =       tFactory.newTransformer(new StreamSource(_xslFileName));    DOMSource domSource = new DOMSource(_xmlDoc);    transformer.transform(domSource, new StreamResult(_out));  } }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -