1QXmlReader(3qt)                                                QXmlReader(3qt)
2
3
4

NAME

6       QXmlReader - Interface for XML readers (i.e. parsers)
7

SYNOPSIS

9       All the functions in this class are reentrant when Qt is built with
10       thread support.</p>
11
12       #include <qxml.h>
13
14       Inherited by QXmlSimpleReader.
15
16   Public Members
17       virtual bool feature ( const QString & name, bool * ok = 0 ) const = 0
18       virtual void setFeature ( const QString & name, bool value ) = 0
19       virtual bool hasFeature ( const QString & name ) const = 0
20       virtual void * property ( const QString & name, bool * ok = 0 ) const =
21           0
22       virtual void setProperty ( const QString & name, void * value ) = 0
23       virtual bool hasProperty ( const QString & name ) const = 0
24       virtual void setEntityResolver ( QXmlEntityResolver * handler ) = 0
25       virtual QXmlEntityResolver * entityResolver () const = 0
26       virtual void setDTDHandler ( QXmlDTDHandler * handler ) = 0
27       virtual QXmlDTDHandler * DTDHandler () const = 0
28       virtual void setContentHandler ( QXmlContentHandler * handler ) = 0
29       virtual QXmlContentHandler * contentHandler () const = 0
30       virtual void setErrorHandler ( QXmlErrorHandler * handler ) = 0
31       virtual QXmlErrorHandler * errorHandler () const = 0
32       virtual void setLexicalHandler ( QXmlLexicalHandler * handler ) = 0
33       virtual QXmlLexicalHandler * lexicalHandler () const = 0
34       virtual void setDeclHandler ( QXmlDeclHandler * handler ) = 0
35       virtual QXmlDeclHandler * declHandler () const = 0
36       virtual bool parse ( const QXmlInputSource & input ) = 0  (obsolete)
37       virtual bool parse ( const QXmlInputSource * input ) = 0
38

DESCRIPTION

40       The QXmlReader class provides an interface for XML readers (i.e.
41       parsers).
42
43       This abstract class provides an interface for all of Qt's XML readers.
44       Currently there is only one implementation of a reader included in Qt's
45       XML module: QXmlSimpleReader. In future releases there might be more
46       readers with different properties available (e.g. a validating parser).
47
48       The design of the XML classes follows the SAX2 Java interface, with the
49       names adapted to fit Qt naming conventions. It should be very easy for
50       anybody who has worked with SAX2 to get started with the Qt XML
51       classes.
52
53       All readers use the class QXmlInputSource to read the input document.
54       Since you are normally interested in particular content in the XML
55       document, the reader reports the content through special handler
56       classes (QXmlDTDHandler, QXmlDeclHandler, QXmlContentHandler,
57       QXmlEntityResolver, QXmlErrorHandler and QXmlLexicalHandler), which you
58       must subclass, if you want to process the contents.
59
60       Since the handler classes only describe interfaces you must implement
61       all the functions. We provide the QXmlDefaultHandler class to make this
62       easier: it implements a default behaviour (do nothing) for all
63       functions, so you can subclass it and just implement the functions you
64       are interested in.
65
66       Features and properties of the reader can be set with setFeature() and
67       setProperty() respectively. You can set the reader to use your own
68       subclasses with setEntityResolver(), setDTDHandler(),
69       setContentHandler(), setErrorHandler(), setLexicalHandler() and
70       setDeclHandler(). The parse itself is started with a call to parse().
71
72       See also QXmlSimpleReader and XML.
73

MEMBER FUNCTION DOCUMENTATION

QXmlDTDHandler * QXmlReader::DTDHandler () const [pure virtual]

76       Returns the DTD handler or 0 if none was set.
77
78       See also setDTDHandler().
79

QXmlContentHandler * QXmlReader::contentHandler () const [pure virtual]

81       Returns the content handler or 0 if none was set.
82
83       See also setContentHandler().
84

QXmlDeclHandler * QXmlReader::declHandler () const [pure virtual]

86       Returns the declaration handler or 0 if none was set.
87
88       See also setDeclHandler().
89

QXmlEntityResolver * QXmlReader::entityResolver () const [pure virtual]

91       Returns the entity resolver or 0 if none was set.
92
93       See also setEntityResolver().
94

QXmlErrorHandler * QXmlReader::errorHandler () const [pure virtual]

96       Returns the error handler or 0 if none is set.
97
98       See also setErrorHandler().
99

bool QXmlReader::feature ( const QString & name, bool * ok = 0 ) const [pure

101       virtual]
102       If the reader has the feature called name, the feature's value is
103       returned. If no such feature exists the return value is undefined.
104
105       If ok is not 0: *ok is set to TRUE if the reader has the feature called
106       name; otherwise *ok is set to FALSE.
107
108       See also setFeature() and hasFeature().
109

bool QXmlReader::hasFeature ( const QString & name ) const [pure virtual]

111       Returns TRUE if the reader has the feature called name; otherwise
112       returns FALSE.
113
114       See also feature() and setFeature().
115

bool QXmlReader::hasProperty ( const QString & name ) const [pure virtual]

117       Returns TRUE if the reader has the property name; otherwise returns
118       FALSE.
119
120       See also property() and setProperty().
121

QXmlLexicalHandler * QXmlReader::lexicalHandler () const [pure virtual]

123       Returns the lexical handler or 0 if none was set.
124
125       See also setLexicalHandler().
126

bool QXmlReader::parse ( const QXmlInputSource * input ) [pure virtual]

128       Reads an XML document from input and parses it. Returns TRUE if the
129       parsing was successful; otherwise returns FALSE.
130
131       Example: xml/tagreader/tagreader.cpp.
132

bool QXmlReader::parse ( const QXmlInputSource & input ) [pure virtual]

134       This function is obsolete. It is provided to keep old source working.
135       We strongly advise against using it in new code.
136

void * QXmlReader::property ( const QString & name, bool * ok = 0 ) const

138       [pure virtual]
139       If the reader has the property name, this function returns the value of
140       the property; otherwise the return value is undefined.
141
142       If ok is not 0: if the reader has the name property *ok is set to TRUE;
143       otherwise *ok is set to FALSE.
144
145       See also setProperty() and hasProperty().
146

void QXmlReader::setContentHandler ( QXmlContentHandler * handler ) [pure

148       virtual]
149       Sets the content handler to handler.
150
151       See also contentHandler().
152
153       Example: xml/tagreader/tagreader.cpp.
154

void QXmlReader::setDTDHandler ( QXmlDTDHandler * handler ) [pure virtual]

156       Sets the DTD handler to handler.
157
158       See also DTDHandler().
159

void QXmlReader::setDeclHandler ( QXmlDeclHandler * handler ) [pure virtual]

161       Sets the declaration handler to handler.
162
163       See also declHandler().
164

void QXmlReader::setEntityResolver ( QXmlEntityResolver * handler ) [pure

166       virtual]
167       Sets the entity resolver to handler.
168
169       See also entityResolver().
170

void QXmlReader::setErrorHandler ( QXmlErrorHandler * handler ) [pure virtual]

172
173       Sets the error handler to handler. Clears the error handler if handler
174       is 0.
175
176       See also errorHandler().
177

void QXmlReader::setFeature ( const QString & name, bool value ) [pure

179       virtual]
180       Sets the feature called name to the given value. If the reader doesn't
181       have the feature nothing happens.
182
183       See also feature() and hasFeature().
184
185       Reimplemented in QXmlSimpleReader.
186

void QXmlReader::setLexicalHandler ( QXmlLexicalHandler * handler ) [pure

188       virtual]
189       Sets the lexical handler to handler.
190
191       See also lexicalHandler().
192

void QXmlReader::setProperty ( const QString & name, void * value ) [pure

194       virtual]
195       Sets the property name to value. If the reader doesn't have the
196       property nothing happens.
197
198       See also property() and hasProperty().
199
200

SEE ALSO

202       http://doc.trolltech.com/qxmlreader.html
203       http://www.trolltech.com/faq/tech.html
204
206       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
207       license file included in the distribution for a complete license
208       statement.
209

AUTHOR

211       Generated automatically from the source code.
212

BUGS

214       If you find a bug in Qt, please report it as described in
215       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
216       help you. Thank you.
217
218       The definitive Qt documentation is provided in HTML format; it is
219       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
220       web browser. This man page is provided as a convenience for those users
221       who prefer man pages, although this format is not officially supported
222       by Trolltech.
223
224       If you find errors in this manual page, please report them to qt-
225       bugs@trolltech.com.  Please include the name of the manual page
226       (qxmlreader.3qt) and the Qt version (3.3.8).
227
228
229
230Trolltech AS                    2 February 2007                QXmlReader(3qt)
Impressum