A convenience wrapper around xml2::xml_validate to check an XLUM file against the reference format description shipped with xlum-package.
Arguments
- file
character or xml2::xml_document (required): path to an XLUM file, or an in-memory xml2::read_xml document to test.
- xsd_version
numeric (optional): format version to be used for validation, e.g., 1. If
NULL(default), the most recent version will be used.
Value
A logical value, with the validation errors in its attributes.
Author
Sebastian Kreutzer, F2.1 Geophysical Parametrisation/Regionalisation, LIAG - Institute for Applied Geophysics (Germany)
Examples
file <- system.file("extdata/xlum_prototype.xlum", package = "xlum")
validate_xlum(file)
#> [1] TRUE
#> attr(,"errors")
#> character(0)