libdonut  2.3.2
Application framework for cross-platform game development in C++20
Static Public Member Functions | Public Attributes | List of all members
donut::xml::Document Struct Reference

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

#include <donut/xml.hpp>

Static Public Member Functions

static Document parse (std::string_view xmlString)
 Parse a document from an XML string. More...
 

Public Attributes

std::unique_ptr< Elementdeclaration {}
 Optional XML declaration. More...
 
std::unique_ptr< Elementroot {}
 Root element of the document tree. More...
 

Detailed Description

Tree of Element nodes defined by an XML file.

Member Function Documentation

◆ parse()

static Document donut::xml::Document::parse ( std::string_view  xmlString)
static

Parse a document from an XML string.

Parameters
xmlStringread-only view over the XML string to parse.
Returns
the parsed document.
Exceptions
Erroron failure to parse any element of the document.
std::bad_allocon allocation failure.

Member Data Documentation

◆ declaration

std::unique_ptr<Element> donut::xml::Document::declaration {}

Optional XML declaration.

◆ root

std::unique_ptr<Element> donut::xml::Document::root {}

Root element of the document tree.


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