I was thinking to test this tags lets say through input box for example the user puts text to check in input box. Lets say he puts in input box starting tag amend and word searches for first instance of <Amend> tag and before finding the next <Amend> it should find closing tag </Amend> if it finds <Amend> before </Amend> it means that closing tag is missing. Am I thinking right or not? I am not even sure if I am thinking right