开发者

Generating html files from xml file [duplicate]

开发者 https://www.devze.com 2023-03-18 06:22 出处:网络
This question already has ans开发者_JAVA百科wers here: creating html page from xml file (3 answers)
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

精彩评论

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