Jump to exact position on page, as identified by TOC entry. Handle
[dorian] / model / xmlhandler.h
1 #ifndef XMLHANDLER_H
2 #define XMLHANDLER_H
3
4 #include <QXmlContentHandler>
5
6 /** Generic XML handler. */
7 class XmlHandler: public QXmlContentHandler
8 {
9 public:
10     bool endDocument() {return true;}
11     bool endPrefixMapping(const QString &) {return true;}
12     QString errorString() const {return QString();}
13     bool ignorableWhitespace(const QString &) {return true;}
14     bool processingInstruction(const QString &, const QString &) {
15         return true;
16     }
17     void setDocumentLocator(QXmlLocator *) {}
18     bool skippedEntity(const QString &) {return true;}
19     bool startDocument() {return true;}
20     bool startPrefixMapping(const QString &, const QString &) {return true;}
21
22     bool characters(const QString &ch) {
23         currentText += ch;
24         return true;
25     }
26
27 protected:
28     QString currentText;
29 };
30
31 #endif // XMLHANDLER_H