A Shallow Algorithm for Correcting Nesting Errors and Other Well-Formedness Violations in XML-like Input