| 295 | } |
| 296 | |
| 297 | void Element::setAttribute(std::string_view _key, std::string_view _value) |
| 298 | { |
| 299 | for (auto& attribute : mAttributes) |
| 300 | { |
| 301 | if (attribute.first == _key) |
| 302 | { |
| 303 | attribute.second = _value; |
| 304 | return; |
| 305 | } |
| 306 | } |
| 307 | mAttributes.emplace_back(_key, _value); |
| 308 | } |
| 309 | |
| 310 | void Element::addContent(std::string_view _content) |
| 311 | { |