Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Mirage on Mar 10, 2008 09:36
open dhtmlx forum
XML reffers to not existing parent - Newbie Question

Hi,
I have downloaded only the dhtmlxTree component for evaluation.
I have modified the tree_add_delete.html file to load another xml file instead of the sample one.
It does not work and throws an error "XML reffers to not existing parent"
Does this work out of the box. Can I load any valid xml file by modifying the above file? Can Editing be done as well?

Answer posted by Support on Mar 11, 2008 03:51
>>Ñan I load any valid xml file by modifying the above file?
Basically yes, but you need sure that XML contains correct reference to parent Item
    <tree id="0" >
and correct XML structure ( http://docs.dhtmlx.info )

The ree@id must point to the parent ID , to which data will be linked, by default super-root ID  == 0, but it can be changed while tree initialization ( 4th parameter of constructor )
In case of dynamic loading the ree@id must be equal to the parent ID for which data requested.


>>Can Editing be done as well?
Yes, but you need to include
    dhtmlxtree_ed.js
and add next command
    tree.enableItemEditor(true);