00001 /* 00002 Copyright © 2010 jonathan courtois 00003 00004 This file is part of QExtend. 00005 00006 QExtend is free software: you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation, either version 3 of the License, or 00009 any later version. 00010 00011 QExtend is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with QExtend. If not, see <http://www.gnu.org/licenses/>. 00018 */ 00019 00020 #ifndef QEXTEND_XMLPARSER_HPP 00021 #define QEXTEND_XMLPARSER_HPP 00022 00023 #include <Core/qextend_global> 00024 #include <QtCore/QFile> 00025 #include <QtCore/QStringList> 00026 #include <QtXml/QDomDocument> 00027 00028 QE_BEGIN_NAMESPACE 00029 00030 00032 00034 00042 class QEXTEND_EXPORT XmlParser 00043 { 00044 private : 00045 QStringList m_ext; 00048 QDomDocument m_xmlDoc; 00049 00050 protected: 00051 QString m_lastError; 00054 public: 00055 XmlParser(); 00056 00057 00058 00060 00061 00063 00073 bool parse(const QString &xmlData); 00074 00075 00076 00078 00079 00081 00092 bool parse(QFile &xmlFile); 00093 00094 00095 00096 00098 00099 00101 00107 QString lastError() const; 00108 00109 00110 00112 00113 00115 00121 void clearLastError(); 00122 }; 00123 00124 QE_END_NAMESPACE 00125 00126 #endif // QEXTEND_XMLPARSER_HPP
© 2000-2026 - www.developpez.com
