Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java & XML need help

Status
Not open for further replies.

youngun

Programmer
Apr 27, 2001
61
US
Hi I try to create a web reporting system using Java and XML. Now I can generate XML code that I need and save it as a String in my java code (i don't want to write it as file on hard disk), and I allow users to create XSL templates (assuming they are experts on XSL syntax) that are saved on hard disk. The question I have is how to create the final HTML file based on XML & XSL I have? I know it works if I manually copy the XML value (a java String variable) and saves it on hard disk with filename "report.xml", and put "report.xsl" under the same directory, and then open IE and type in the URL.
 
>> Now I can generate XML code that I need

How are you "generating" the XML? You should be using an XML DOM to do that like Xalan and Xerces from Apache that theKobbler cites.

You also use the DOM to perform the transformation you desire. Look at the packages javax.xml.transform for the transformation support. Using the classes in that package you will be able to produce the exact process you delineated in your post.

-pete

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top