Thought readers of this forum would be interested in what I beleive is the easiest, most flexible way of generating dynamic XML and HTML.

It is called the FormattedDataSet. It is an open source project available at

The following simple code will render the query as an HTML Table and XML respectively. Developers have full control on the text that is generated. For more info go to

FormattedDataSet fds=FormattedDataSet.createInstance();
String html=fds.getFormattedDataSet("select * from employees", "htmlTable");
String xml=fds.getFormattedDataSet("select * from employees", "xml");