|
FERS 0.1.0
The Flexible Extensible Radar Simulator
|
Class for managing XML documents. More...
#include "libxml_wrapper.h"
Public Member Functions | |
| XmlDocument () | |
| Constructor for XmlDocument. | |
| ~XmlDocument ()=default | |
| XmlDocument (const XmlDocument &)=delete | |
| XmlDocument (XmlDocument &&) noexcept=default | |
| XmlDocument & | operator= (const XmlDocument &)=delete |
| XmlDocument & | operator= (XmlDocument &&) noexcept=default |
| bool | loadFile (std::string_view filename) |
| Load an XML file into the document. | |
| bool | loadString (const std::string &content) |
| Load an XML document from a string in memory. | |
| bool | saveFile (const std::string_view filename) const |
| Save the document to a file. | |
| std::string | dumpToString () const |
| Dumps the document to a string. | |
| void | setRootElement (const XmlElement &root) const |
| Set the root element of the document. | |
| XmlElement | getRootElement () const |
| Get the root element of the document. | |
| bool | validateWithDtd (std::span< const unsigned char > dtdData) const |
| Validate the document using a DTD. | |
| bool | validateWithXsd (std::span< const unsigned char > xsdData) const |
| Validate the document using an XSD schema. | |
Class for managing XML documents.
Definition at line 340 of file libxml_wrapper.h.
| XmlDocument::XmlDocument | ( | ) |
Constructor for XmlDocument.
| std::runtime_error | if the document creation fails. |
Definition at line 350 of file libxml_wrapper.h.
|
default |
|
delete |
|
defaultnoexcept |
| std::string XmlDocument::dumpToString | ( | ) | const |
Dumps the document to a string.
Definition at line 277 of file libxml_wrapper.cpp.
References logging::ERROR, LOG, max, and xml_detail::toString().
Here is the call graph for this function:| XmlElement XmlDocument::getRootElement | ( | ) | const |
Get the root element of the document.
| std::runtime_error | if the document is not loaded or the root element is missing. |
Definition at line 428 of file libxml_wrapper.h.
References max.
| bool XmlDocument::loadFile | ( | std::string_view | filename | ) |
Load an XML file into the document.
| filename | The name of the file to load. |
Definition at line 247 of file libxml_wrapper.cpp.
References logging::ERROR, LOG, and max.
Load an XML document from a string in memory.
| content | The string containing the XML document. |
Definition at line 262 of file libxml_wrapper.cpp.
References logging::ERROR, math::Vec3::length(), LOG, and max.
Here is the call graph for this function:
|
delete |
|
defaultnoexcept |
Save the document to a file.
| filename | The name of the file to save to. |
Definition at line 390 of file libxml_wrapper.h.
References logging::ERROR, LOG, and max.
| void XmlDocument::setRootElement | ( | const XmlElement & | root | ) | const |
Set the root element of the document.
| root | The root element to set. |
| std::runtime_error | if the document is not created. |
Definition at line 413 of file libxml_wrapper.h.
References max.
Validate the document using a DTD.
| dtdData | The DTD data used for validation. |
| XmlException | if the DTD is invalid or the validation fails. |
Definition at line 123 of file libxml_wrapper.cpp.
References logging::ERROR, LOG, and max.
Validate the document using an XSD schema.
| xsdData | The XSD data used for validation. |
| XmlException | if the XSD is invalid or the validation fails. |
Definition at line 165 of file libxml_wrapper.cpp.
References logging::ERROR, logging::FATAL, LOG, and max.