-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparser.h
More file actions
38 lines (30 loc) · 984 Bytes
/
parser.h
File metadata and controls
38 lines (30 loc) · 984 Bytes
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
/*
parser.h - demonstration of a parser in C++
*/
#ifndef PARSER_H
#define PARSER_H
#include <qstring.h>
#include <QtXml/QXmlDefaultHandler>
#include <QtXml/QXmlAttributes>
class Parsert : public QXmlDefaultHandler
{
public:
Parsert();
/** given by the framework from qxml. Called when parsing the xml-document starts. */
bool startDocument();
void setDocumentLocator(QXmlLocator*);
int lineNumber();
/** given by the framework from qxml. Called when the reader occurs an open tag (e.g. \<b\> ) */
bool startElement( const QString&, const QString&, const QString& qName, const QXmlAttributes& att );
bool endElement( const QString&, const QString&, const QString& qName );
bool characters(const QString& ch);
QString href(int i);
QXmlLocator* loc;
int bodystartx; // where the html body starts
int bodystarty; // where the html body starts
int getbodystarty();
int getbodystartx();
int hrefcount();
QList<QString> hrefs;
};
#endif