XMLParserCPP 1.0
Loading...
Searching...
No Matches
XMLElement.h
1/*
2 * Copyright (C) 2025 Yury Bobylev <bobilev_yury@mail.ru>
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the Free
6 * Software Foundation, version 3.
7 *
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program. If not, see <https://www.gnu.org/licenses/>.
15 */
16#ifndef XMLELEMENT_H
17#define XMLELEMENT_H
18
19#include <XMLElementAttribute.h>
20#include <string>
21#include <vector>
22
29{
30public:
35
40 XMLElement(const XMLElement &other);
41
47
54 operator=(const XMLElement &other);
55
59 std::string element_name;
60
64 std::vector<XMLElementAttribute> element_attributes;
65
69 std::vector<XMLElement> elements;
70
74 std::string content;
75
98
103
110 bool empty = false;
111};
112
113#endif // XMLELEMENT_H
Type element_type
XMLElement type.
Definition XMLElement.h:102
std::vector< XMLElementAttribute > element_attributes
Vector of XML element attributes.
Definition XMLElement.h:64
XMLElement & operator=(const XMLElement &other)
operator =
bool empty
If true indicates XML elements without content.
Definition XMLElement.h:110
std::string element_name
XML element name.
Definition XMLElement.h:59
XMLElement(XMLElement &&other)
XMLElement move constructor.
std::vector< XMLElement > elements
Vector of XML element subelements.
Definition XMLElement.h:69
XMLElement(const XMLElement &other)
XMLElement copy constructor.
std::string content
XML element content if any.
Definition XMLElement.h:74
Type
XML elements types enumerator.
Definition XMLElement.h:80
@ SpecialElement
Definition XMLElement.h:91
@ ProgramControlElement
Definition XMLElement.h:84
@ Comment
Definition XMLElement.h:89
@ CharData
Definition XMLElement.h:87
@ OrdinaryElement
Definition XMLElement.h:93
@ ElementContent
Definition XMLElement.h:96
XMLElement()
XMLElement constructor.