[英]How to create a XML file using JSP/HTML and XSLT
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 (ie, 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). 等等...带有输入标签和类似JSP文件(或HTML)中的内容。 Then, after an user interaction and click on submit, this form need to create a XML file with this schema
然后,在用户交互并单击提交之后,此表单需要使用此架构创建一个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 若昂·维森特
一种方法是使用Java脚本从html读取用户输入并构建xml。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.