开发者

Generating html files from xml file [duplicate]

This question already has ans开发者_JAVA百科wers here: creating html page from xml file (3 answers) Closed 9 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜