traverse textual nodes of an arbitrary tree