Finished my complicated solution to getting page content as a tree structure list.