Categories | Question details Back To List | ||
dhtmlXTree drag-and-drop I know how to load the tree using tree.loadXML("mytree.xml"). How do I load the tree if I don't have an xml file - either I am gathering/generating the tree information or it's being forwarded to me (from another page)? Answer posted by support on Mar 10, 2008 07:34 loadXML requires only
XML stream with data from server ( it can be generated by any server side
script ). So, you can use following: tree.loadXML(somescript); Also tree provides other ways of adding data: 1) loading from xml string tree.loadXMLString(xml_string) 2) loading from json object or file, please see sample - http://www.dhtmlx.com/docs/products/dhtmlxTree/samples/json_support/pro_load_json.html 3) using insertNewItem and insertNewChild methods to add nodes one by one. Here is the sample - http://www.dhtmlx.com/docs/products/dhtmlxTree/samples/loading_processing_data/pro_add_item.html |