loadXML({{python_string}}) Incorrect XML

I’m using running web2py, a python web framework, and trying to pass an XML response to dhtmlxGrid’s grid.loadXML() but get the Incorrect XML error.

MyView.html

    <div id="page">
        <div id="mygrid" style="width:100%;height:270px;background-color:white;"></div>
        

    </div>

The var {{=rowxml}} is sent from the server side in the XML syntax structure required by dhtmlx according to the doc.


data

I’ve tried using grid.parse() and the gridbox and headers don’t even appear. With grid.load() it renders the gridbox and headers but doesn’t populate any data. If I copy the XML string sent from the server-side to a static xml file and assign to grid.load() it works, but I don’t want the server script to create an static xml everytime.

Does anybody see what I’m missing?? Or suggestions??

–Jay

If you want load grid from xml string you should use parse() method.

Please check more information about “Incorrect XML” error here docs.dhtmlx.com/doku.php?id=dhtm … leshooting