How do I attach an event to a tree initialized from inline X

How can I attach an event (say onDblClick) to a tree initialized as follows:



    



    

        

            

                

            

            

            

        

    < /xmp>

    


It can be done as




function myFunc(id){
    …
};