HTML网页中的数据以XML格式保存 [英] data from HTML webpage to be saved in XML

查看:718
本文介绍了HTML网页中的数据以XML格式保存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我已经通过JavaScript将数据从XML提取到HTML网页中,现在,如果我在网页上进行了更改(例如选择其他单选按钮,选中复选框等),我希望将所做的更改保存回XML中.我已经尝试了很多,但是我不知道该怎么做.
请告诉我任何这样做的方法.

感谢

解决方案

XML不能用作数据库.它用于以相当易读的格式交换机器可读数据.

您可以做的是
1.使用数据库存储数据
2.从存储的数据动态生成XML
3.使用该XML生成网页等...
4.将更改保存回数据库,而不是XML

编写代码来更新数据库比编写代码来更新XML磁盘文件要容易得多.


hi
i have fetched the data from an XML into an HTML webpage through JavaScript, and now if i make changes on my webpage(like selecting different radio button, checking a check box etc.) i want those changes made to be saved back in my XML. I have tried a lot but i don''t know how to do that.
Please tell me any method of doing this.

Thanks

解决方案

XML is not meant to be used as a database. It is used to exchange machine readable data in a fairly human readable format.

What you can do is,
1. Use a database to store the data
2. Generate XML from the stored data dynamically
3. Use that XML to generate web pages, etc...
4. Save the change back to database, not XML

Writing code to update a database is far more easier than writing code to update a XML disk file.


这篇关于HTML网页中的数据以XML格式保存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆