XMLParserCPP
1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
XMLParserCPP.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 XMLPARSERCPP_H
17
#define XMLPARSERCPP_H
18
19
#include <XMLElement.h>
20
#include <string>
21
#include <vector>
22
39
45
class
XMLParserCPP
46
{
47
public
:
51
XMLParserCPP
();
52
63
std::vector<XMLElement>
64
parseDocument
(
const
std::string &xml_document);
65
66
private
:
67
void
68
replaceXMLEntities(std::vector<XMLElement> &elements);
69
70
void
71
replacementFunc(std::string &str);
72
73
XMLElement
74
parseTag(
const
std::string &document,
size_t
&position);
75
76
void
77
parseSpecialElement(
const
std::string &document,
size_t
&position,
78
XMLElement
&element);
79
80
XMLElementAttribute
81
parseElementAttribute(
const
std::string &document,
size_t
&position);
82
83
void
84
formResult(std::vector<XMLElement> &result,
85
std::vector<XMLElement>::iterator start,
86
std::vector<XMLElement>::iterator end);
87
88
std::vector<std::tuple<std::string, std::string>> replacement;
89
};
90
91
#endif
// XMLPARSERCPP_H
XMLElementAttribute
The XMLElementAttribute class.
Definition
XMLElementAttribute.h:27
XMLElement
The XMLElement class.
Definition
XMLElement.h:29
XMLParserCPP::XMLParserCPP
XMLParserCPP()
XMLParserCPP constructor.
XMLParserCPP::parseDocument
std::vector< XMLElement > parseDocument(const std::string &xml_document)
Parses XML document.
XMLParserCPP.h
Generated by
1.17.0