SCAN (for each element at the selected branch) Write the LI code, the text, and the /LI code IF there are sub elements Write_The_List (for the selected elements) ENDIF ENDSCAN>>
SCAN (for each element at the selected branch) Write the start tag and the text IF there are sub elements Write_The_List (for the selected elements) Write the end tag ENDIF ENDSCAN>