发送邮件的content

public void testxxl() { try { File xmlFile = new File("D:/Marvell/TM_niuzc_20110110/release/WebContent/ExecutionReportXml/task[7358]_d4446243-31f3-4c84-b6f5-3852ef16bb6b.xml"); File xsltFile = new File("D:/Marvell/TM_niuzc_20110110/release/WebContent/ReportTeamplate/CommonTaskReport.xsl"); javax.xml.transform.Source xmlSource = new javax.xml.transform.stream.StreamSource( xmlFile); javax.xml.transform.Source xsltSource = new javax.xml.transform.stream.StreamSource( xsltFile); javax.xml.transform.Result result = new javax.xml.transform.stream.StreamResult( System.out); // 创建一个TransformerFactory 实例 javax.xml.transform.TransformerFactory transFact = javax.xml.transform.TransformerFactory .newInstance(); javax.xml.transform.Transformer trans = transFact.newTransformer(xsltSource); trans.transform(xmlSource, result); } catch (Exception e) { System.out.println("出错 "); } }

你可能感兴趣的:(c,exception,File)