在HTML页面中使用XML而不使用服务器 [英] Using XML in HTML page without using a server

查看:160
本文介绍了在HTML页面中使用XML而不使用服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在HTML网页中使用XML并使用javascript从XML文件中检索信息?

Is it possible to use XML in HTML pages and retrieve the information using javascript from the XML files?

我问的是因为我没有服务器和我使用HTA。
我想要XML包含数据,如果必要的话很容易修改和更新。

I'm asking it because I don't have a server and I'm using an HTA. I want the XML to contain data and that it will be easy to modify and update if necesary.

我试过使用xmlhttprequest,它没有服务器当然..

I tried using xmlhttprequest and it's not working without a server of course..

我认为使用这个XML页面作为主页面,只使用CSS来设计它,但它似乎甚至比使用普通的HTML

I thought using this XML pages as the main page and only use CSS to design it, but it seems to be even uglier than just using a normal HTML page.

感谢您,
Rotem

Thanks, Rotem

推荐答案

完全通过Web浏览器运行,因此不需要服务器端技术(如php,Coldfusion,.NET等)。

Javascript is run entirely via your web browser, so there is no need for a server side technology (such as php, Coldfusion, .NET, etc).

如果你在本地存储一个jquery的副本,并加载它,你可以做一些漂亮的XML操作:
http://think2loud.com/reading-xml-with-jquery/

If you store a copy of jquery locally, and load it, you can do some pretty fancy XML manipulation: http://think2loud.com/reading-xml-with-jquery/

这听起来像你可能想做一个XSLT变换(http://en.wikipedia.org/wiki/Xslt)。这也可以在Web浏览器中完成,无需运行任何服务器。

It sounds like you might be wanting to do an XSLT Transform (http://en.wikipedia.org/wiki/Xslt). This can also be done within a web browser without any server to run upon.

这篇关于在HTML页面中使用XML而不使用服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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