Results 1 to 1 of 1
Thread: Transforming XML to HTML
-
Transforming XML to HTML
The class below shows how to convert XML to HTML using XSLT.
Java Code:public class HowToXSLT { public static void main(String[] args) { try { TransformerFactory tFactory = TransformerFactory.newInstance(); Transformer transformer = tFactory.newTransformer (new javax.xml.transform.stream.StreamSource ("howto.xsl")); transformer.transform (new javax.xml.transform.stream.StreamSource ("howto.xml"), new javax.xml.transform.stream.StreamResult ( new FileOutputStream("howto.html"))); } catch (Exception e) { e.printStackTrace( ); } } }
Similar Threads
-
Html tags within XML- need help
By iamhappy in forum XMLReplies: 2Last Post: 03-27-2008, 04:21 PM -
JScrollPane with HTML
By Java Tip in forum Java TipReplies: 0Last Post: 03-14-2008, 11:32 AM -
transforming double to int
By AlejandroPenton in forum New To JavaReplies: 2Last Post: 12-11-2007, 01:34 AM -
JApplet and html
By paty in forum Java AppletsReplies: 1Last Post: 08-02-2007, 05:41 PM -
HTML to PDF
By Heather in forum New To JavaReplies: 1Last Post: 07-08-2007, 01:24 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks