Reverted changes to validate_xml