I think it's fine to add a check for xml. Fixed.