YUI recommends YUI 3.
YUI 2 has been deprecated since 2011. This site acts as an archive for files and documentation.
In this simple example you can see how to build TreeView Control from existing HTML markup and from a previous tree definition or from a branch of it.