OpenWord 1.0.0
Modern C++17 library for parsing, manipulating, and saving DOCX files.
Loading...
Searching...
No Matches
Validator.h
Go to the documentation of this file.
1#pragma once
2#include <gsl/gsl>
3#include <memory>
4#include <string>
5
6namespace openword {
7
9 public:
14 explicit SchemaValidator(gsl::czstring xsdPath);
16
19
23 bool isValid() const;
24
31 bool validate(gsl::czstring xmlContent, std::string &outErrors) const;
32
33 private:
34 struct Impl;
35 std::unique_ptr<Impl> pimpl;
36};
37
38} // namespace openword
Definition Validator.h:8
SchemaValidator(gsl::czstring xsdPath)
Loads an XSD schema for validation.
SchemaValidator & operator=(const SchemaValidator &)=delete
bool validate(gsl::czstring xmlContent, std::string &outErrors) const
Validates an XML string against the loaded schema.
bool isValid() const
Checks if the schema was successfully loaded and parsed.
SchemaValidator(const SchemaValidator &)=delete
Definition Document.h:12