如何在浏览器中解析本地XML文件?

发布于 11-24 14:16 字数 203 浏览 2 评论 0原文

我们有一个可以搜索的网站。我们想将此网站制作成 CD,并保留搜索功能。因为我们希望它能够离线运行,所以我们无法使用数据库,所以我们认为我们使用 XML 文件作为“存储”。

现在的问题是我们无法使用javascript读取本地xml文件,因为某些浏览器认为这是一个安全问题。

如何读取和使用我们的离线网站的本地 XML 文件?我们可以使用什么技术来实现这一目标?

We have a website that has the option to search. We want to put this website on a CD and we want to preserve the search functionality. Because we want it to function offline also we can't use a database sow e thought we use an XML file as "storage".

Now the problem is that we can't read the local xml file using javascript because some browsers consider this a security problem.

How to read and use a local XML file for our offline website? What technology can we use to achieve that?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

大姐,你呐2024-12-01 14:16:15

嗯,您始终可以嵌入签名的 Java 小程序。这将为您提供完整的文件系统访问权限。 Java 小程序可以读取并解析 XML 文件,并将数据发送到页面上的 JavaScript 函数。

Well, you could always embed a signed java applet. This will give you full filesystem access. The java applet can read and parse the XML file and send the data to a JavaScript function on your page.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文