From 3ccd1eb012b2732b61bce5c3cfbf44dd158769d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D1=81=D0=BE=D0=B2=D0=B8=D0=BA=20=D0=9F=D0=BE=D0=BB?= =?UTF-8?q?=D0=B8=D0=BD=D0=B0=20=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD?= =?UTF-8?q?=D0=B4=D1=80=D0=BE=D0=B2=D0=BD=D0=B0?= Date: Sun, 17 Jan 2021 13:47:59 +0000 Subject: [PATCH] Upload New File --- xmlparser.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 xmlparser.h diff --git a/xmlparser.h b/xmlparser.h new file mode 100644 index 0000000..adc727d --- /dev/null +++ b/xmlparser.h @@ -0,0 +1,36 @@ +#ifndef XMLPARSER_H +#define XMLPARSER_H + +#include "mainwindow.h" +#include "ui_mainwindow.h" +#include +#include +#include +#include + + + +class XMLParser : public QXmlDefaultHandler +{ +private: + QString m_strText; + QString title; + QTreeWidgetItem *treeItem; + QTreeWidget *treeWidget; + QTreeWidgetItem *curChild; + + +public: + friend class MainWindow; + // ------------------------------------------------------------------ + bool startElement(const QString&, + const QString&, + const QString&, + const QXmlAttributes& attrs + ); + bool characters(const QString& strText); + bool endElement(const QString&, const QString&, const QString& str); + bool fatalError(const QXmlParseException& exception); +}; + +#endif -- GitLab