can some one guide me on creating a sample xml parser using sax and xslt where in the output of the xml parser must be a xml file ?
Thanks
Kavita
-
XML Parser uding XSLT and SAX (1 messages)
- Posted by: Kavita Mundada
- Posted on: March 07 2006 01:59 EST
Threaded Messages (1)
- Hi, Here is the source for ur query by Manikandan Gnanadev on April 17 2007 07:15 EDT
-
Hi, Here is the source for ur query[ Go to top ]
- Posted by: Manikandan Gnanadev
- Posted on: April 17 2007 07:15 EDT
- in response to Kavita Mundada
import net.sf.saxon.TransformerFactoryImpl; import javax.xml.transform.*; import javax.xml.transform.stream.*; public class TransformXsl { public static void main (String[] args) { try { TransformerFactory factory = TransformerFactory.newInstance(); Transformer tobj = factory.newTransformer(new StreamSource("filescheck.xsl")); System.setProperty("javax.xml.transform.TransformerFactory","net.sf.saxon.TransformerFactoryImpl"); tobj.transform(new StreamSource("dataset.xml"), new StreamResult(new File("filecheck_error.xml")); } catch (Exception e) { System.out.println("Exception: " + e); } } } Regards.