$text = join '', grep { not ref $_ } $tree->content_list;