Write a Python function that takes a string as an input and checks if it is a valid XML document according to the XML specification. The function should return True if the input string is a valid XML document, and False otherwise. The function should handle edge cases such as invalid syntax, missing tags, and incorrect attribute values. The function should also be able to handle documents in various encodings and parsing options. Use Python's built-in XML library to perform the validation.
This prompt doesn't seem malicious.