Categories | Question details Back To List | ||
Serialize producing malformed xml I seem to be getting malformed xml out of my serialize calls from my treegrid... my xml is loaded dynamically and comes over in these two chunks: <?xml version="1.0" encoding="UTF-8"?> <rows> <head> <column width="400" type="tree" align="left">Announcement</column> <column width="75" type="ro" align="left">Date</column> </head> <row align="top" id="551239:0:Total" xmlkids="1" open="1"> <cell image="blank.gif"><![CDATA[Total]]></cell> <cell image="blank.gif"><![CDATA[]]></cell> </row> </rows> And then <?xml version="1.0" encoding="UTF-8"?> <rows parent="551239:0:Total"> <row align="top" id="551239:-1:633663" open="1"> <cell image="blank.gif"><![CDATA[Important Message!]]></cell> <cell image="blank.gif"><![CDATA[05/28/2007]]></cell> </row> <row align="top" id="551239:-1:633722" open="1"> <cell image="blank.gif"><![CDATA[Please Read This]]></cell> <cell image="blank.gif"><![CDATA[05/14/2007]]></cell> </row> </rows> And the treegrid looks like this: mygrid = new dhtmlXGridObject('D8'); mygrid.setSerializationLevel(false,false,false,true,true); mygrid.setImagePath("../dhtmlx/imgs/"); mygrid.enableMultiline(true); mygrid.setSkin("modern"); mygrid.setColTypes("tree,ro"); mygrid.kidsXmlFile = "FormReportBranchXml"; mygrid.loadXML("FormReportXml?P0=551239&P1=476&P2=476&P3=1188501790776&P4=false"); But if I edit the "Important Mesage!" cell and serialize, I get xml that looks like this: <?xml version="1.0"?><rows><row id="551239:-1:633663"><cell changed="1">I chang\ed this</cell><cell>05/28/2007</cell></row> </row> </row> </rows> I.e. a bunch of close row tags with no corresponding open row tags. Am I doing something wrong? Answer posted by Stanislav on Sep 04, 2007 17:27 problem caused by mygrid.setSerializationLevel(false,false,false,true,true); you specified to serialize only changed rows, but to maintain structure treeGrid need to provide parent rows as well - in result such mess occurs We will update treeGrid serialization to the next build, for now please don't use "serialize only changed" with treeGrid. ( If functionality really critical for you - please contact at dhtmlx@scand.com - probably I will be able to provide some kind of hotfix ) |