Well you're missing a closing ) in this line - the A() is closed but the LI(
is not:
{{ myli = LI(A(myrow['strRegionNameRendered'], _href="#") }}
Why not simplify your template down a bit - Having your LI's inside a DIV
seems a bit odd.
{{myUL = UL(_id="dhtmlgoodies_tree", _class="dhtmlgoodies_tree")}}
{{for row in sortedfolderlist:}}
{{myrow = row[1]}}
{{myUL.append(A(myrow['strRegionNameRendered'], _href="#")) }}
{{pass}}
{{=myUL}}

