Extract method extractCatsTreeHtml.