0

I am trying to create HTML file from the result of an execution. The result is in the form of XML. There are few transformers that I can use to transform XML to HTML using XSLT file.

Other thing I will also have is the JAVA object of result which I can use for converting it to HTML.

Which of the above two approach is better and is there any API that I can use to convert java object to HTML other than XSLT or FILE I/O.

any one help?

1 Answer 1

1

I believe you have to go by xml (either directly or generated from your java object by jaxb).

In principle the templating frameworks (Velocity, Freemarker ...) can let you prepare a template into which you can inject your java object and render the response as you whish. But personally I think it will be easier/simple just to transform the xml that you already have

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.