DHTMLXTree - Serialization

Hi,



It seems tree sierialization need a javascript extension library to be imported but nothing is mentioned in the documentation.



Regards,

Jean.

The main file - dhtmlxtree.js contains core functionality, some, not so common extension stored in external js files, for serialization it will be - codebase/ext/dhtmlxtree_xw.js
The API documentation contains references for necessary files.

Actually, serialization requires the dhtmlxtree_xw.js extension. serializeTree  is  professional version method.

But such an information is defined in the documentation dhtmlx.com/docs/products/dht … alpha.html:

serializeTree() [Professional]
return xml description of tree

Object:
dhtmlXTreeObject
Topic(s):
File required:dhtmlxtree_xw.js

Hi,
In fact I was looking in the doc explorer : dhtmlx.com/docs/products/doc … dhtmlxtree
Thanks,Jean.
 
 

Hi,
Then I have another question: Can you do something like this ?
      myTree.setSerializationLevel(false, true);      var contextTreeXml = myTree.serializeTree();      myTree.deleteChildItems(0);      myTree.loadXMLString(contextTreeXml);
Regards,Jean.

Yes, this is correct logic, the serialized XML can be used for tree initialization ( actually theme switching on main tree page at dhtmlx.com done in such way )