4#ifndef GREM_CORE_FORMATS_XML_HPP
5#define GREM_CORE_FORMATS_XML_HPP
Base exception type for runtime errors.
Definition Error.hpp:38
Nullable RAII data pointer with exclusive ownership of an object that is automatically destroyed on p...
Definition UniquePointer.hpp:77
Definition aliases.hpp:22
StringBase< char, std::char_traits< char >, std::allocator< char > > String
Definition String.hpp:17
StringViewBase< char, std::char_traits< char > > StringView
Definition StringView.hpp:16
Named attribute of an Element with an optional value.
Definition xml.hpp:40
String value
Attribute value, or empty for no value.
Definition xml.hpp:42
UniquePointer< Attribute > next
Next neighboring attribute in the list that this attribute is part of.
Definition xml.hpp:43
String name
Name of the attribute.
Definition xml.hpp:41
Tree of Element nodes defined by an XML file.
Definition xml.hpp:60
UniquePointer< Element > root
Root element of the document tree.
Definition xml.hpp:76
static Document parse(StringView xmlString)
Parse a document from an XML string.
UniquePointer< Element > declaration
Optional XML declaration.
Definition xml.hpp:75
Node in a Document.
Definition xml.hpp:49
UniquePointer< Element > next
Next neighboring element in the list that this element is part of.
Definition xml.hpp:54
String tag
Element tag name.
Definition xml.hpp:50
UniquePointer< Attribute > attributes
Linked list of element attributes.
Definition xml.hpp:52
String content
Raw non-element text content of the element.
Definition xml.hpp:51
UniquePointer< Element > children
Linked list of children of this element.
Definition xml.hpp:53
size_t lineNumber
Line number, starting at 1 for the first line, where the error occured.
Definition xml.hpp:29
Error(const auto &message, StringView::iterator position, size_t lineNumber)
Definition xml.hpp:31
StringView::iterator position
Iterator into the source XML string where the error originated from.
Definition xml.hpp:24