The question how to create HTML output to the browser from a Servlet based on XML data often comes up.
Here's a fully functional example on how to achieve this using Jakarta Xalan 2 and Xerces 2.
The system is quite simple, most of the code is concerned with housekeeping chores rather than the actual HTML generation and output.