The grid working fine, but when I try to load data from XML shows Error type: LoadXML Description: Incorrect XML
What I’m doing wrong… I did open the XML file in IE, it’s perfectly there.
Here is my code:
GRIDRECEBERg = new dhtmlXGridObject(‘MGRIDGRIDRECEBER’);
GRIDRECEBERg.imgURL = “…/files/dhtmlxGrid/codebase/imgs/”;
GRIDRECEBERg.setHeader(“idpagar,Vencimento,Documento,Nome do cliente,Emiss�o,Valor,Saldo,Observa��es”);
GRIDRECEBERg.setInitWidths(“0,100,100,300,100,100,100,100”);
GRIDRECEBERg.setColAlign(“left,left,left,left,left,right,right,left”);
GRIDRECEBERg.setColTypes(“ed,ed,ed,ed,ed,ed,ed,ed”);
GRIDRECEBERg.setColSorting(“str,date,str,str,date,int,int,str”);
GRIDRECEBERg.setSkin(G_SKIN_GRID);
GRIDRECEBERg.setEditable(false);
GRIDRECEBERg.enableEditEvents(false,false,false);
GRIDRECEBERg.attachEvent(‘onRowDblClicked’,doOnRowDblClickedGRIDRECEBER);
GRIDRECEBERg.enableColumnMove(true);
GRIDRECEBERg.enableAutoSizeSaving();
GRIDRECEBERg.init();
GRIDRECEBERg.enableSmartRendering(true);
GRIDRECEBERg.loadXML(‘file.xml’);
Here is my xml File:
<?xml version="1.0" encoding="ISO-8859-1" ?>
5C4379F9-6036-4467-9934-8094CEA1355E
16/07/2002
G135
EUSTAQUIO PEDRO BRAGA
15/07/2002
139,02
139,02
P-00000168
74276C13-F24E-483A-AD57-C8D1D8F1A0B5
16/07/2002
001281
FARMACIA CRUZEIRO LTDA
15/07/2002
68,40
68,40
P-00000170
Your xml is rendered without errors. Please make sure that you have specify the right path to the xml file.