Coding trees as strings for approximate tree matching