Categories | Question details Back To List | ||
Error Type loadXML I am using the loadXML("serverSideScript.php") function to load a grid. I call a php server side script to load the grid. I keep getting the "Error Type loadXML" error. However, If I break into my code and copy the contents of my output variable directly into a file and then load that same XML from a file, the grid loads fine...So I know it is not the XML string itself. I can also take that same string and load it from loadXMLString() function with no problems. I have multiple grids throughout my application and I have used this same method throughout when populating those grids. I use the same headers and everything. So I am completely perplexed as to why this grid won't populate. What else can I look for that may be causing this? Answer posted by Support on Nov 21, 2008 07:53 http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Common_Problems_in_Grid.html#grid_art_comprob There are only two possible reasons a) incorrect headers b) start of output before <?xml tag Just load the same url in separate browser window, - if XML contains some error - error description will be shown - if XML has incorrect content type it will be rendered as plain text without coloring Answer posted by Michael Chetock on Nov 21, 2008 06:53 I started looking for code that may be being outputting content that should not be doing so. It turns out that in my "switch" statement that I use to call the proper xml builder function for each corresponding grid, I did NOT have a "break;" statement for this particular "case". Therefore it was outputting the XML properly.... but then it was continuing on and running the code in the next "case" statement, which outputs something completely different. Once I put the "break;" in there it worked fine. Thanks.
|