I have written a web-service (in Java) which produces as a result a (rather complex) XML document.
I’m required to return an HTML rendering of the document, if requested. Doesn’t have to be fancy, displaying the XML source with some basic formatting such as correctly indenting elements would do.
How do I do this?
I agree, XSL would be the best approach. If you want to turn it into something that actually looks like XML, but just inside HTML, you could use something like this:
And throw in some CSS:
UPDATE: