A a convenience wrapper around xml2::xml_validate against the reference format description shipped with xlum-package

validate_xlum(file, xsd_version = NULL)

Arguments

file

xml2::xml_document (required): object to test

xsd_version

numeric (optional): specify format version for the validation, e.g., 1, 1.1. The default is NULL, which will use the most recent version

Value

Results of the validation logical with attributes

Author

Sebastian Kreutzer, Geography & Earth Sciences, Aberystwyth University

How to cite

Kreutzer, S., 2022. validate_xlum(): Validate xlum format against an XSD reference schema. In: Kreutzer, S., 2022. xlum: Read, Write, and Convert XLUM Data. R package version 0.1.0.

Examples

file <- system.file("extdata/xlum_prototype.xlum", package = "xlum")
validate_xlum(file)
#> [1] TRUE
#> attr(,"errors")
#> character(0)