-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathXmlNode.h
More file actions
37 lines (32 loc) · 1.26 KB
/
XmlNode.h
File metadata and controls
37 lines (32 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once
#include <iostream>
#include <vector>
#include "Attributes.h"
class XmlNode
{
Attributes attributes;
std::string tag;
std::string text;
std::vector<XmlNode*> childrens;
void free();
public:
XmlNode() = default;
~XmlNode();
XmlNode* XmlReader(const std::string&, size_t&, size_t);
//std::string TagParser(const std::string&, size_t&);
void print() const
{
std::cout << " tag:" << tag << " text" << text << " AttributeID" << attributes.getKey() << " AttributeValue" << attributes.getValue() << "\n";
}
XmlNode* searchID(const std::string&) const;
XmlNode* searchKey(const std::string&) const;
//void print() const; //ïðèíòèðà
//id - value // key - ID
XmlNode* select(const std::string&, const std::string&); //èçâåæäà ñòîéíîñò íà åëåìåíò
void set(const std::string&, const std::string&, const std::string&); //ïðèñâîÿâàíå íà ñòîéíîñò íà àòðèáóò
void children(const std::string&) const; //ñïèñúê ñ àòðèáóòè
//void child(const std::string, size_t); //äîñòúï äî ï-òèÿ íàñëåäíèê
//void text(size_t); //äîñòúï äî òåêñòà íà åëåìåíò
//void delete(const std::string, const std::string); //èçòðèâàíå íà àòðèáóò íà åëåìåíò ïî êëþ÷
//void newchild(const std::string); //äîáàâÿíå íà íîâ íàñëåäíèê
};