The user can get an XML representation (as a string) of the tree using method serializeTree():
<script> tree.serializeTree(); </script>
Also there is the possibility to return the tree as a JSON string like this:
<script> tree.serializeTreeToJSON(); </script>
XML serialization can be easily configured in the following way:
<script> tree.setSerializationLevel(userData,fullXML,escapeEntities,userDataAsCData,DTD); </script>
The parameters are as follows:
The user can prevent caching in IE by adding random value to URL string with the help of method preventIECaching():
<script> tree.preventIECaching(true|false); // false by default </script>
There is the possibility in dhtmlxTree to register an XML entity for replacement of special symbols while initialization of the tree (default ones are: ampersand, “less then” and “greater then” symbols):
<script> tree.registerXMLEntity(rChar,rEntity); </script>
The parameters are the following:
There is a simple method that allows the user to remove the tree completely and to clear memory:
<script> tree.destructor(); </script>