validate¶
-
astropy.io.votable.validate(source, output=None, xmllint=False, filename=None)[source] [edit on github]¶ Prints a validation report for the given file.
Parameters: source : str or readable file-like object
output : writable file-like object, optional
Where to output the report. Defaults to
sys.stdout. IfNone, the output will be returned as a string.xmllint : bool, optional
When
True, also send the file toxmllintfor schema and DTD validation. Requires thatxmllintis installed. The default isFalse.sourcemust be a file on the local filesystem in order forxmllintto work.filename : str, optional
A filename to use in the error messages. If not provided, one will be automatically determined from
source.Returns: is_valid : bool or str
Returns
Trueif no warnings were found. IfoutputisNone, the return value will be a string.