39 explicit XmlError(
const std::string &what) : std::runtime_error(what) {}
61 [[nodiscard]]
const std::string *
attribute(
const std::string &
name)
const;
66 const std::string &fallback)
const;
75 [[nodiscard]] std::vector<const Element *>
Exception thrown by parse() and parseFile().
XmlError(const std::string &what)
Element parseFile(const std::string &path)
Element parse(const std::string &text)
One attribute of an element.
std::string name
attribute name as written, including any prefix
std::string value
value with entity and character references decoded
One XML element with its attributes and child elements.
std::vector< Attribute > attributes
in document order
std::string name
tag name as written
const Element * child(const std::string &name) const
const std::string * attribute(const std::string &name) const
std::vector< Element > children
child elements in document order
std::string attributeOr(const std::string &name, const std::string &fallback) const
std::vector< const Element * > childrenNamed(const std::string &name) const