kword/latex/export/xmlparser.h
1
2/*
3** Header file for inclusion with kword_xml2latex.c
4**
5** Copyright (C) 2000-2002 Robert JACOLIN
6**
7** This library is free software; you can redistribute it and/or
8** modify it under the terms of the GNU Library General Public
9** License as published by the Free Software Foundation; either
10** version 2 of the License, or (at your option) any later version.
11**
12** This library is distributed in the hope that it will be useful,
13** but WITHOUT ANY WARRANTY; without even the implied warranty of
14** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15** Library General Public License for more details.
16**
17** To receive a copy of the GNU Library General Public License, write to the
18** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20**
21*/
22
23#ifndef __LATEX_XMLPARSER_H__
24#define __LATEX_XMLPARSER_H__
25
26#include "tqstring.h"
27#include "tqdom.h"
28#include "config.h"
29
30class FileHeader;
31class Document;
32class KoStore;
33
40class XmlParser
41{
43 TQDomDocument _document;
45 static KoStore* _in;
47 Config *_config;
48
49 protected:
50 /* All the inherit class must be have a link with
51 * the header to specify to use special package
52 */
53 //static FileHeader *_fileHeader;
54 static Document *_root;
56 static TQString _filename;
57
58 public:
59 XmlParser(Config*, TQString);
60 XmlParser(Config*, TQByteArray); /* deprecated */
61 XmlParser(Config*, const KoStore*);
62 XmlParser();
63 virtual ~XmlParser();
64
65 TQString getFilename () const { return _filename; }
66 TQString getDocument () const { return _document.toString(); }
67 Document* getRoot () const { return _root; }
68 //FileHeader* getFileHeader () const { return _fileHeader; }
69 KoStore* getStorage () const { return _in; }
70 TQString getChildName(TQDomNode, int);
71 TQDomNode getChild(TQDomNode, TQString);
72 TQDomNode getChild(TQDomNode, TQString, int);
73 TQDomNode getChild(TQDomNode, int);
74 TQString getData(TQDomNode, int);
75 int getNbChild(TQDomNode, TQString);
76 int getNbChild(TQDomNode);
77 TQString getAttr(TQDomNode, TQString) const;
78 bool isChild(TQDomNode, TQString);
79
80 //void setFileHeader(FileHeader* h) { _fileHeader = h; }
81 void setRoot (Document* r) { _root = r; }
82
83 TQDomNode init() { return _document.documentElement(); }
84
85};
86
87#endif /* __LATEX_XMLPARSER_H__ */
88
This class hold all parameters and configuration from a file or from the filter configuration dialog ...
This class hold a whole document with its headers, footers, footnotes, endnotes, content,...
This class hold all general information about the doc : does it use a color markup,...
This class supply some convenients methods to access to a DOM tree.
static TQString _filename
Latex output file.