get_xml_encoding

astropy.utils.xml.iterparser.get_xml_encoding(source)[source]

Determine the encoding of an XML file by reading its header.

Parameters
sourcereadable file-like object, read function or str path
Returns
encodingstr