In this context, Tree Edit Distance (TED) has been widely used for many years.
one of the main constraints of this method is to tune the cost of edit operations, which makes it difficult or sometimes very challenging in dealing with complex problems.