-
Notifications
You must be signed in to change notification settings - Fork 0
/
XML.h
57 lines (52 loc) · 1.01 KB
/
XML.h
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
* XML.h
*
* Created on: Nov 17, 2012
* Author: tyler
*/
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <algorithm>
#include "./rapidxml/rapidxml.hpp"
#include "./rapidxml/rapidxml_print.hpp"
#include "Page.h"
#include "WordRef.h"
#include "AvlTree.h"
#ifndef XML_H_
#define XML_H_
using namespace std;
using namespace rapidxml;
class XML {
public:
XML();
virtual ~XML();
void parsePage(const string&);
void traverse_xml(const string&);
string load_file(const string&);
void printPage();
void storePage();
string getPath();
string getTitle();
string getAuthor();
string getDate();
string getText();
void setPath(string);
void setTitle(string);
void setAuthor(string);
void setDate(string);
void setText(string);
void clearSpecialChars(string&);
void clearSpecialCharsDate(string&);
void parseText();
private:
string title;
string author;
string date;
string text;
string id;
AvlTree<string, WordRef *> * wordRefs;
};
#endif /* XML_H_ */