If you just want to display a web page, consider XML as a source of the *data* included in the web page. What you would need then, is a way to transform the XML document into HTML. This is where XSL comes in. In order to make the transformation, you need yet another file, an XSL stylesheet (as well as an XSLT processor like Xalan).
The stylesheet is a mixture of XML and HTML tags, and tells the processor how to format certain elements based on the tags surrounding them. For example, lets say you want to take the previous weather XML document and put it on your web page. Your XSL stylesheet might have tags like:
The above (which it just a portion of the actual stylesheet, tells the processor to make the information in the "name" tag bold and the value in the "temp" tag italic.
If you have Xalan installed correctly (have the jar in your CLASSPATH), all you have to do to convert XML to HTML using a stylesheet is (from a command line):
java org.apache.xalan.xslt.Process -in weather.xml -xsl style.xsl -out weatherPage.html
So this allows you to batch-process many XML documents, turning them into static web pages for use on your site. If you then want to totally change the way your site looks, design a new stylesheet, process the docs again, and you're done.
Or if you already have a
servlet engine, you can write a simple servlet that calls the processor and dynamically applies a stylesheet based on some variable.
Hope I have not confused you further.
You should be able to download Xalan from xml.apache.org and run one of the simple examples.
Good luck,
Bill