2 // C++ Interface: parasaxparser
4 // Description: SAX2-Parser for 'para' elements of a DocBook file.
7 // Author: Robert Vogl <voglrobe@web.de>, (C) 2005
9 // Copyright: See COPYING file that comes with this distribution
12 #ifndef PARASAXPARSER_H
13 #define PARASAXPARSER_H
19 // App specific includes
20 #include "saxhandler.h"
23 This class is a singleton.
31 * Creates the single instance of this parser (if not
32 * allready exists) and returns a pointer to it.
34 static ParaSaxParser
* Instance();
37 * Because this parser sees nothing but the 'para'
38 * parts of the document, it requires the documents header
39 * info, e.g. to resolve entities defined in the internal DTD.
40 * \param data The header (preamble) of the DocBook document.
42 void setProcessingInstruction(const QString
&data
);
45 * This is the 'para' element to parse. It has to be encapsulated
46 * in <para> and </para>. Nested 'para' elements are not supported.
47 * \param data See description.
49 void setData(const QString
&data
);
52 * Returns the pure text content of the paragraph without tags.
53 * \param data See description.
55 void getText(QString
&data
);
58 * Returns the text in RTF format, i.e. replaces DocBook tags
60 * \param data See description.
62 void getRTFText(QString
&data
);
68 static ParaSaxParser
* _instance
;
69 SaxHandler
* m_handler
;
70 QXmlSimpleReader
* m_reader
;
71 QString m_XmlInputHeader
;
72 QString m_XmlInputBody
;