I have a web application which makes some Ajax calls and I want to set the server domain name to be used for the ajax calls in an XML configurations file. I have seen this tutorial which shows how to parse xml file in javascript. But the problem is that I need to make an Ajax call to parse the xml file and for that I need to know the server domain name (which I am already trying to fetch from the xml).So how can I set the server name in an XML file and use to make ajax calls? Is there any other way I can configure the server name outside the javascript file itself?