filters
xmlparser.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __LATEX_XMLPARSER_H__
00024 #define __LATEX_XMLPARSER_H__
00025
00026 #include "qstring.h"
00027 #include "qdom.h"
00028
00029 class FileHeader;
00030 class Document;
00031 class KoStore;
00032
00033 class XmlParser
00034 {
00036 QString _filename;
00038 QDomDocument _document;
00040 static KoStore* _in;
00041
00042 protected:
00043
00044
00045
00046 static FileHeader *_fileHeader;
00047 static Document *_root;
00048
00049 public:
00050 XmlParser(QString);
00051 XmlParser(QByteArray);
00052 XmlParser(const KoStore*);
00053 XmlParser();
00054 virtual ~XmlParser();
00055
00056 QString getFilename () const { return _filename; }
00057 QString getDocument () const { return _document.toString(); }
00058 Document* getRoot () const { return _root; }
00059 FileHeader* getFileHeader () const { return _fileHeader; }
00060 QString getChildName(QDomNode, int);
00061 QDomNode getChild(QDomNode, QString);
00062 QDomNode getChild(QDomNode, QString, int);
00063 QDomNode getChild(QDomNode, int);
00064 QString getData(QDomNode, int);
00065 QString getData(QDomNode, QString);
00066 int getNbChild(QDomNode, QString);
00067 int getNbChild(QDomNode);
00068 QString getAttr(QDomNode, QString) const;
00069 bool isChild(QDomNode, QString);
00070
00071 void setFileHeader(FileHeader* h) { _fileHeader = h; }
00072 void setRoot (Document* r) { _root = r; }
00073
00074 QDomNode init() { return _document.documentElement(); }
00075
00076 };
00077
00078 #endif
00079
|