如何使用JSP / HTML和XSLT创建XML文件

时间:2023-01-29 09:55:58

I've already created some html code using a XML file and based on a XSLT template.

我已经使用XML文件并基于XSLT模板创建了一些HTML代码。

Howerver, this time I need to create an inverse process (i.e., based on HTML code, create a XML file).

然而,这次我需要创建一个逆过程(即,基于HTML代码,创建一个XML文件)。

Plus, I need to create some quiz like:

另外,我需要创建一些测验:

Personal Info

Name:___

Age:____

etc... with input tags and stuff like that in a JSP file (or HTML). Then, after an user interaction and click on submit, this form need to create a XML file with this schema

etc ...带有输入标签和JSP文件(或HTML)中的类似东西。然后,在用户交互并单击“提交”之后,此表单需要使用此架构创建XML文件

<Personal Info>
   <name>...</name>
   <age>...</age>
   ...
</Personal Info>

In the future, this XML doc will be inserted in Form attribute on Java, through Controller, and persisted in database.

将来,这个XML文档将通过Controller插入到Java的Form属性中,并保存在数据库中。

Thanks

João Vicente

1 个解决方案

#1


0  

One way is to use java script for reading the user inputs from html and build xml.

一种方法是使用java脚本从html读取用户输入并构建xml。

#1


0  

One way is to use java script for reading the user inputs from html and build xml.

一种方法是使用java脚本从html读取用户输入并构建xml。