KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > xalanDoc > business > ManagerImpl


1 package xalanDoc.business;
2
3 import javax.xml.transform.stream.StreamSource JavaDoc;
4 import javax.xml.transform.dom.DOMResult JavaDoc;
5 import javax.xml.transform.TransformerFactory JavaDoc;
6 import javax.xml.transform.Transformer JavaDoc;
7
8 import xalanDoc.spec.*;
9
10
11 public class ManagerImpl implements Manager{
12
13
14 public void transform(String JavaDoc dir,DOMResult JavaDoc element)throws Exception JavaDoc{
15     
16         
17     TransformerFactory JavaDoc tFactory = TransformerFactory.newInstance();
18         Transformer JavaDoc transformer = tFactory.newTransformer(new StreamSource JavaDoc(dir+"/contact-table.xsl"));
19         transformer.transform(new StreamSource JavaDoc(dir+"/contacts.xml"),element);
20
21 }
22
23
24 }
Popular Tags