如何将XML文件保存到IndexedDB数据库中? [英] How can I save an XML file into an IndexedDB database?

查看:99
本文介绍了如何将XML文件保存到IndexedDB数据库中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的SQL Server中,我在一个表中有64k +条记录.我想将这些记录存储在我的客户端IndexedDB数据库中.

In my SQL server, I have 64k+ records in a single table. I want to store those records in my client-side IndexedDB database.

我想为这些数据创建XML文件,读取这些文件并将内容保存在我的IndexedDB中.我被困在读取XML文件并将其保存到IndexedDB中.

I thought to create XML files of those data, read those files and save the contents in my IndexedDB. I am getting stuck in reading XML file and saving it to IndexedDB.

如何将XML文件保存到IndexedDB数据库中?

How can I save an XML file into an IndexedDB database?

推荐答案

我不会为此使用XML.您为什么不编写一个以JSON格式提供数据的查询?将其保存到IDB会容易得多.

I wouldn't use XML for that. Why don't you write a query that gives you the data in a JSON format? This will be a lot easier to save this into IDB.

在IDB中存储如此大量的记录并不是真正可取的.考虑一下您要执行此操作的原因.也许还有其他方法可以实现相同的功能,而不必传输所有这些数据.

Also storing such a large number of records in the IDB isn't really preferable. Think good about the reason you want to do this. Maybe there are other ways to achive the same functionality without having to transfer all this data.

这篇关于如何将XML文件保存到IndexedDB数据库中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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