获取使用Ajax的XML文件文件、Ajax、XML

2023-09-10 21:44:53 作者:迷情Pox Dose

当我试图从一个网站的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 InternetExplorer 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