验证#
- astropy.io.votable.validate(source, output=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, xmllint=False, filename=None)[源代码]#
打印给定文件的验证报告。
- 参数:
- source : path-like object 或 file-like objectPYTHON:类路径对象或PYTHON:类文件对象
通向 VOTABLE XML文件或
Path
具有指向 VOTABLE XML文件。如果是类似文件的对象,则必须是可读的。- output : file-like object ,可选Python:类似文件的对象,可选
报告的输出位置。默认为
sys.stdout
。如果None
,则输出将以字符串形式返回。必须是可写的。- xmllint : bool ,可选可选的布尔
什么时候?
True
,同时将文件发送到xmllint
用于架构和DTD验证。需要这个xmllint
已安装。默认值是False
.source
必须是本地文件系统上的文件才能xmllint
工作。- filename :
str
,可选Python:字符串,可选 在错误消息中使用的文件名。如果未提供,则自动从
source
.
- 返回: