获取使用Ajax的XML文件 [英] Get an XML file using Ajax

查看:101
本文介绍了获取使用Ajax的XML文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我试图从一个网站的XML文件(RSS提要)我做不到 明白这一点。

When I try to get an XML file (RSS feed) from a site I can't get it.

的网页浏览器Internet和NBSP; Explorer和Firefox告诉我,我没有授权

The web browsers Internet Explorer and Firefox tell me that I have no authorization.

现在,我身后的代理,但也许它会产生该消息。莫非 从一个网站(我的)我不能让其他网站的其他资源(域) 出于安全原因?

Now I'm behind a proxy, but maybe it produces that message. Could it be that from a site (mine) I can't get other resource of another site (domain) for security reasons?

推荐答案

如果您尝试访问使用XMLHtt prequest另一个域中的XML文件,那么你可以不上的目的......这是一个安全问题。然而,一个解决方法是使用代理页面抢XML,看到这些:

If you're trying to access an XML file on another domain using XMLHttpRequest then you can't, on purpose... it's a security issue. However, a workaround is to use a proxy page to grab the XML, see these:

http://developer.yahoo.com/javascript/howto-proxy.html

http://ejohn.org/blog/cross-site-xmlhtt prequest /

http://ajaxpatterns.org/Cross-Domain_Proxy

这篇关于获取使用Ajax的XML文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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