get_xml_encoding#
- astropy.utils.xml.iterparser.get_xml_encoding(source)[源代码]#
通过读取XML文件的头来确定XML文件的编码。
- 参数:
- source : path-like object , file-like (readable) ,或者
callable()
Python:类路径对象、类文件(可读)或Python:callable() 包含读取它的数据或函数的句柄。如果是函数或可调用对象,则必须直接从流中读取。不可调用的对象必须定义
read
方法。
- source : path-like object , file-like (readable) ,或者
- 返回:
- encoding :
str
Python :字符串
- encoding :