diff --git a/xmlparser.h b/xmlparser.h new file mode 100644 index 0000000000000000000000000000000000000000..adc727d1c93ed5f71ee4c3502b4d9cdacc7a1666 --- /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