Incorrect XML


I’ve adapted your sample JSP example with a servlet but keep getting the infamous ‘Incorrect XML’ error message.

My servlet code is simple and as follows:

        String xml = “<?xml version=\"1.0\" encoding=\"UTF-8\"?>hellomr01 Jan 1970”;
        response.setHeader(“Cache-Control”, “no-cache”);

My index.html page is very similar to the one in the example and is as follows:

        function doOnLoad(){
            mygrid = new dhtmlXGridObject(‘gridbox’);
            mygrid.setHeader(“First Name, Title, Date of Birth”);

From my FireFox debugger i can see the XML returned and it looks ok. Details are as follows:

Response Headers
Date    Wed, 13 Jun 2007 06:55:58 GMT
Server    Oracle Containers for J2EE
Content-Length    131
Connection    Keep-Alive
Keep-Alive    timeout=15, max=100
Content-Type    text/xml; charset=ISO-8859-1
Cache-Control    no-cache

<?xml version="1.0" encoding="UTF-8"?>hello worldmr01 Jan

If i send a request to the same URL from the same html page using a native XMLHttpRequest object i get back a valid XML response. Any ideas?

Thanks in advance.

Basically grid uses the same XMLHttpRequest object, so if it work for normal object it will work for grid as well.
In your case problem caused by XML text itself - grid expects to find standard “//rows/row/cell” structure but instead of it it got “//clients/client/some
While in theory it possible to adapt grid to different XML schema, without code modification grid will work only with standard XML tag names