| 1 |
// Copyright (C) 2016 The Qt Company Ltd. |
| 2 |
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 |
#ifndef PARSER_H |
| 4 |
#define PARSER_H |
| 5 |
|
| 6 |
#include <qglobal.h> |
| 7 |
|
| 8 |
#include <qfile.h> |
| 9 |
#include <qstring.h> |
| 10 |
#include <qxml.h> |
| 11 |
|
| 12 |
class ContentHandler; |
| 13 |
|
| 14 |
class Parser : public QXmlSimpleReader |
| 15 |
{ |
| 16 |
public: |
| 17 |
Parser(); |
| 18 |
~Parser(); |
| 19 |
|
| 20 |
bool parseFile(QFile *file); |
| 21 |
QString result() const; |
| 22 |
QString errorMsg() const; |
| 23 |
|
| 24 |
private: |
| 25 |
ContentHandler *handler; |
| 26 |
}; |
| 27 |
|
| 28 |
#endif |