|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
A parsed XML document that owns its rows and hierarchy. More...
#include <XmlDocument.hpp>
Public Member Functions | |
| std::optional< XmlElementView > | element_at (uint64_t row) const noexcept |
| Borrow an element by its row index. | |
| const Kakshya::CompositeForest & | forest () const noexcept |
| The rows together with their parent index. | |
| std::optional< XmlElementView > | root_element () const noexcept |
| Borrow the document root element. | |
Static Public Member Functions | |
| static std::shared_ptr< const XmlDocument > | from_rows (Kakshya::CompositeArray rows, std::string &error) |
| Take ownership of rows in the XML node layout. | |
| static std::shared_ptr< const XmlDocument > | load (const std::string &path, std::string &error) |
| Parse a file into an owning document. | |
Private Member Functions | |
| XmlDocument (std::shared_ptr< const Kakshya::CompositeForest > forest) noexcept | |
Private Attributes | |
| std::shared_ptr< const Kakshya::CompositeForest > | m_forest |
A parsed XML document that owns its rows and hierarchy.
Reads a file once and keeps the preorder Composite rows with their parent index, so element views stay valid for as long as the document lives and no reader has to stay open. Any consumer can bind described records from the views, walk the forest, or select a branch as a Region. The document is immutable and shared.
Usage:
Definition at line 29 of file XmlDocument.hpp.