GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::xml::Document Struct Reference

Tree of Element nodes defined by an XML file. More...

#include <GREM/core/formats/xml.hpp>

Static Public Member Functions

static Document parse (StringView xmlString)
 Parse a document from an XML string.

Public Attributes

UniquePointer< Element > declaration {}
 Optional XML declaration.
UniquePointer< Element > root {}
 Root element of the document tree.

Detailed Description

Tree of Element nodes defined by an XML file.

Member Function Documentation

◆ parse()

Document grem::xml::Document::parse ( StringView xmlString)
staticnodiscard

Parse a document from an XML string.

Parameters
xmlStringread-only view over the XML string to parse.
Returns
the parsed document.
Exceptions
xml::Erroron failure to parse any element of the document.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

Member Data Documentation

◆ declaration

UniquePointer<Element> grem::xml::Document::declaration {}

Optional XML declaration.

◆ root

UniquePointer<Element> grem::xml::Document::root {}

Root element of the document tree.


The documentation for this struct was generated from the following file: