使用JavaScript从url读取xml文件

问题描述:

如何使用JavaScript

How i can read XML file from url (http://www.website.com/xmlfile.xml) using JavaScript

从url(http://www.website.com/xmlfile.xml)读取XML文件这里没有这样的工作。



以下是询问者的预期:

1. 首先尝试什么你想做!你可能会发现它并不那么难。

2.制定你所做的事情看似问题/不工作。



尝试一下,告诉你是否面临问题。

各位会员非常乐意帮忙。






我会为你提供一些提示。阅读 XMLHttpRequest (传统的Ajax)。使用它,您可以向URL发送请求并以XML格式取回响应。试试。
It does not work like this here.

Here is what is expected of enquirers:
1. TRY first what you want to do! You may find that it''s not that hard.
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help like this.



I will provide you a hint on it. Read about XMLHttpRequest (traditional Ajax). using it, you can send a request to URL and get back the response as an XML. Try out.