Open local xml file


I tried to open local xml file with ajax request like
var request = GXmlHttp.create();“GET”, “RSS.xml”, true);
request.onreadystatechange = function() {

if (window.XMLHttpRequest){
xmlhttp=new XMLHttpRequest();}
xmlhttp=new ActiveXObject(“Microsoft.XMLHTTP”);}“GET”,“C:\RSS.xml”,false);

but i had always a error message.

I see that with Dxhtml we can open it :

z = new dhtmlXCombo(“combo_zone”, “alfa2”, 200, ‘image’);

Did i forgot some thing? Please a i need your help

It is said that ajax should use http protocal.
I’m not very sure.


a file can be loaded by Ajax if it is in the same domain as the html page. Therefore,“GET”,“C:\RSS.xml”,false); can throw an error.

You may also use our dhtmlxAjax. Here is the sample:
dhtmlxAjax/samples/01_samples_of_usage/01_send_request.html … quest.html

thanks you for your help

First i don’t understand how can i use the http protocol (for jyginger). I think with .send() we already use it. can you give more explanations. Thanks
i looked to the code of dhtmlxcommon.js. There are the same requests (as mentionned on the web) with an if wether it’s IE or firefox…the difference that there is an other function to wait until the xml loaded (dtmlXMLLoaderObject.prototype.waitLoadFunction=function(dhtmlObject)). is there a way to code this function simply?
effectively, i tried to use the dhtmlxAjax. specificaly i did :
var t=new dtmlXMLLoaderObject(true);
it works. the problem that i dont know how to manipulate the variable t. i used t.documentElement.getElementsByTagName(“coordinates”); to reach all of my coordinates included in RSS.xml but it doesn’t work

How can i manipulate t variable??

Thank you


  1. I debug codes under web server(installed locally,say,appache,iis) and visit web files through localhost/…, it uses the http protocal.

  2. I use dhtmlx in my codes, as well as jQuery, and I usually use jquery’s $.ajax(…) for ajax requests. Note: returned xml from dhtmlx(such as myform.send(url,function(xml){}) ) is accepted only when it is transformed by jquery.xmldom() function.

hope it will help you.

How can i manipulate t variable??

method dtmlXMLLoaderObject is not public. Here is the documentation about dhtmlxAjax: