hey,there in the outerspace; is there a simple way to connect to a xml file from a servlet. i have a servlet, that creates a xml file and i want to display this xml file in a browser from this servlet. sounds complicated? ok, the basic question is: i have a servlet and a xmlfile(with a xslfile) and i want the servlet to call the xml file, just like a browser call a html file to display. any idea? bernd :roll:
Bernd I assume you're wanting to transform the xml into HTML so it can be displayed neatly in the browser? If that is the case then you're going to want to look into filter and using your xsl template to transform the xml into formatted HTML. Sun has a tutorial on them that actually has an example of using an xsl template to transform an xml document into html. The example they give is fairly complex and can probably be done much simpler if your document is not very complicated.
Joined: Jun 21, 2002
hey dave, thanx for your help. it seems, that i was a little bit on the edge, cause yesterday, after sleeping about it,i saw, that i only had to parse the xml file and that`s it i think. first i had the idea, that there could be something like href in html. ciao Bernd