I recently was editing some xml files and found I have to deal with a lot of missing/mismatched tags. Is there any good way to automatically fix this problem? Is this something faced by a lot of people?

It would be great if you can share some of your experience/thoughts with me on this. Thank you in advance.