updating xml file and synchronize it with a database


I don’t know if it’s the best solution, in fact I would thank you all for any suggestion you have.

I would know how can I update xml file (�cause when I refresh the form, xml old values are reloaded into page), or what is the best method to do this.

And what is the way to load the xml file into a database? Thank you.

There is no way to directly manipulate with source XML file , the
component is pure client side, so it not able to manipulate with server
data on its own, but next way to save data back to server is available

( all samples mentioned below can be checked online at dhtmlx.com )

a) By using dataProcessor library, this way for each action in tree (
adding/deleting/editing) related event handler generate AJAX call to
server side. There are no ready to use sample for Java but guide
describes which vars sent to server for each type of call. You only need
to implement the correct DB updates for specified AJAX calls.

b) By serialization. The dhtmlxGrid can be serialized back to XML and
sent to server ( the sending routine is not implemented in grid and must
be implemented manually ), where XML can be parsed, data extracted and
DB updated.

c) form integration - grid can integrates in surrounding tag and
include all ( changed ) values in form scope on submit. This functionality
available starting from dhtmlxGrid 1.3

d) handle onCellChanged or onCellEdit events and make custom sync on
cell value changing

a-c available only in PRO version,