Skip to content

scram::xml::Validator

RelaxNG validator.

#include <xml.h>

Public Functions

Name
Validator(const std::string & rng_file)
voidvalidate(const Document & doc)<br>Validates XML DOM documents against the schema.
Validatorfrom_memory(const std::string_view & rng_content)

Public Functions Documentation

function Validator

cpp
explicit Validator(
    const std::string & rng_file
)

Parameters:

  • rng_file The path to the schema file.

Exceptions:

function validate

cpp
inline void validate(
    const Document & doc
)

Validates XML DOM documents against the schema.

Parameters:

  • doc The initialized XML DOM document.

Exceptions:

function from_memory

cpp
static Validator from_memory(
    const std::string_view & rng_content
)

Parameters:

  • rng_content The RelaxNG schema content as a string.

Exceptions:

  • ParseError RNG content parsing has failed.
  • LogicError The XML library functions have failed internally.

Updated on 2026-01-09 at 21:59:12 +0000