Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by tep on Mar 30, 2008 22:54
open dhtmlx forum
loadXML error

Hi,

i'd just like to know what are ALL possible reasons for the "loadXML error", like if the xml file cannot be found,what else..if possible can i get ALL? so that i may be able to find what is wrong..

thank you in advance..
Answer posted by Support on Mar 31, 2008 02:21

There are some reasons why XML is not loaded correctly:

a) The simplest but most common - please be sure that path which you used inside loadXML command is valid and produces correct XML response.

b) Please check that XML response generated by script is correct XML 

 - syntax is correct (some special chars can corrupt output, also if you use encoding different from UTF-8, please be sure that it is correctly specified in XML header);

- correct content type assigned - text/xml;

- in case of FF, there must not be any whitespaces before start of output and <?xml declaration;

To check all these requirements, just point your browser to XML generation script - if everything is correct, browser will render correct XML document. 

c) The XML must contain specified structures (the same name for top tag, and item tags).


Answer posted by tep on Mar 31, 2008 07:29

sir the thing is, if i use a relatively fast internet connection like a dsl or within a LAN, the page loads perfectly..but then when i tried accessing the page using a slow connection as in dial-up-speed connection, somethings not working as it should be and so the loadXML error is flashed..

is there some sort of time threshold to load the grid?like for example the system is only given 10secs if not the error will come out, something like that..i can't seem to see what else could be wrong..

by the way im using ajax to load the page..

hope you can help..thanks in advance..

Answer posted by Support on Mar 31, 2008 08:16
>>is there some sort of time threshold to load the grid
There is no any special limitation.

Please try to use attached dhtmlxcommon.js instead of original one - it will show exact server side response, so if any problem occurs while XML retrieving, then output will show problem details
Attachments (1)
Answer posted by noel on Mar 10, 2009 22:07
I got the same problem using the PHP code getGridRecords.php.  The problem I saw was it was calling getGridRecords.php?posStart=x&count=x .    If posStart is not 0, the loadXML error happens because the TotalCount variable gets undefined.

What I did was change the code pertaining to print rows. (see below)

 //   print("<rows total_count='".$totalCount."' pos='".$posStart."'>");  
    print("<rows>");
Answer posted by Support on Mar 12, 2009 04:11
Latest version of dhtmlxcommon_debug.js 
Attachments (1)