astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v5.2.1 »
- Astropy Core Package Utilities (`astropy.utils`) »
- get_xml_encoding

# get_xml_encoding

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

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

  Parameters:
    source python:path-like object, readable file-like object python:file-like object, or `python:callable()`

      Handle that contains the data or function that reads it. If a function or callable object, it must directly read from a stream. Non-callable objects must define a `read` method.

  Returns:
    encoding `python:str`