Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can we use AJAX to utilize remote xml file?

Status
Not open for further replies.

rammi07

Programmer
Aug 1, 2006
20
0
0
NL
Hi all. i am tryng to use ajax for pulling some dynamic xml data from a remote server but not sure if it can pull xml data from remote server . I be happy if some one guide me before i go deep in learing AJAX .Thanks
 
Guide you in what exactly? If your server can dish up XML over a HTTP connection you can grab it with an "AJAX" of your choice.

[sub]Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
[/sub]

Enable Apps
 
That is probably the primary purpose of Ajax, to obtain xml documents from the web server without reloading the page.

The key ingredient is the scriptable HTTP client now included in most browsers and available in Javascript, one flavor in IE and another flavor in Firefox and for the rest of the world.

One limitation of Ajax is that the HTTP client may only communicate with the domain that provided the web page, that is , So that might rule out the "remote server" you mentioned. This limitation is a security constraint.

If you need to communicate with a server in another domain, such as then you must do that with a server-side script, not with Ajax.

At least that is my understanding, I am not an expert on this topic.
 
Thank u for your replies. Actually i am not running my own server. I have a webpage in one of free hosting sites and there is a xml file with data on it located in diffrent server and i do not have controle over it. What i want pull that xml information every few seconds and display it in my page.(dynamic xml rss feed) But i am not sure if ajax can do that. Other wise i am looking for other ways to achive this task.So looking forward for some suggestions.Thanks
 
Do you have access to the XML files? If you have the ability to access the XML files whenever you want, then it can be done, otherwise there's no way possible.

<.

 
monksnake yes rss xml files can be accessed at all time. The radio station offered that to be used.So could u point me to correct ajax that every few seconds pulls data from xml and display it ?Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top