Generating html files from xml file [duplicate]
I have a web page where the information of all the users are stored and I am storing the information of the users in a xml file. COnsider the name of the xml file "abc.xml" when the users to open the same page say "www.domain.com/abc.html" I neeed to constracut the HTML fetching the data from the xml using servlets.
A couple of possible (clean) approaches:
- deserialize the xml file with XStream or jaxb, feed the deserialized data to a JSP and generate the HTML server side.
- use XSLT to have the html rendering done client side.
For me there's no "best" choice between those, it depends on your use case and constraints.
精彩评论