Tree initialization from xml

Hi, I have this question



I am creating a tree from htm (

    • tags) and I want to know if is posible set a branch as “open”



      What attribute must I write ? It could be something like this?









      • TITLE 1





        • OPTION 1














      Another isssue:

      If I choose initialization from xml, how I can set an option as link?



      Is this code wright?







      Go to page

















      Thanks in advance




  • Hello,


    in order to open item in case of html initialization you can use openItem method. But in this case instead of dhtmlxTree class you should use dhtmlXTreeFromHTML to get tree object (dhtmlx.com/docs/products/dhtmlxT … _html.html):







    • TITLE 1

      • OPTION 1







    function initTree(){


    var myTree = dhtmlXTreeFromHTML(‘listBox’);


    myTree.openItem(‘id1’);


    }


    In case of xml structure you can use place html into text attribute: