1QXmlSimpleReader(3qt)                                    QXmlSimpleReader(3qt)
2
3
4

NAME

6       QXmlSimpleReader - Implementation of a simple XML reader (parser)
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       Inherits QXmlReader.
15
16   Public Members
17       QXmlSimpleReader ()
18       virtual ~QXmlSimpleReader ()
19       virtual void setFeature ( const QString & name, bool value )
20       virtual bool parse ( const QXmlInputSource * input, bool incremental )
21       virtual bool parseContinue ()
22

DESCRIPTION

24       The QXmlSimpleReader class provides an implementation of a simple XML
25       reader (parser).
26
27       This XML reader is sufficient for simple parsing tasks. The reader:
28
29       provides a well-formed parser;
30
31       does not parse any external entities;
32
33       can do namespace processing.
34
35       Documents are parsed with a call to parse().
36
37       See also XML.
38

MEMBER FUNCTION DOCUMENTATION

QXmlSimpleReader::QXmlSimpleReader ()

41       Constructs a simple XML reader with the following feature settings:
42       <center>.nf
43
44       </center>
45
46       More information about features can be found in the Qt SAX2 overview.
47
48       See also setFeature().
49

QXmlSimpleReader::~QXmlSimpleReader () [virtual]

51       Destroys the simple XML reader.
52

bool QXmlSimpleReader::parse ( const QXmlInputSource * input, bool incremental

54       ) [virtual]
55       Reads an XML document from input and parses it. Returns FALSE if the
56       parsing detects an error; otherwise returns TRUE.
57
58       If incremental is TRUE, the parser does not return FALSE when it
59       reaches the end of the input without reaching the end of the XML file.
60       Instead it stores the state of the parser so that parsing can be
61       continued at a later stage when more data is available. You can use the
62       function parseContinue() to continue with parsing. This class stores a
63       pointer to the input source input and the parseContinue() function
64       tries to read from that input souce. This means that you should not
65       delete the input source input until you've finished your calls to
66       parseContinue(). If you call this function with incremental TRUE whilst
67       an incremental parse is in progress a new parsing session will be
68       started and the previous session lost.
69
70       If incremental is FALSE, this function behaves like the normal parse
71       function, i.e. it returns FALSE when the end of input is reached
72       without reaching the end of the XML file and the parsing cannot be
73       continued.
74
75       See also parseContinue() and QSocket.
76
77       Examples:
78

bool QXmlSimpleReader::parseContinue () [virtual]

80       Continues incremental parsing; this function reads the input from the
81       QXmlInputSource that was specified with the last parse() command. To
82       use this function, you must have called parse() with the incremental
83       argument set to TRUE.
84
85       Returns FALSE if a parsing error occurs; otherwise returns TRUE.
86
87       If the input source returns an empty string for the function
88       QXmlInputSource::data(), then this means that the end of the XML file
89       has been reached; this is quite important, especially if you want to
90       use the reader to parse more than one XML file.
91
92       The case of the end of the XML file being reached without having
93       finished parsing is not considered to be an error: you can continue
94       parsing at a later stage by calling this function again when there is
95       more data available to parse.
96
97       This function assumes that the end of the XML document is reached if
98       the QXmlInputSource::next() function returns
99       QXmlInputSource::EndOfDocument. If the parser has not finished parsing
100       when it encounters this symbol, it is an error and FALSE is returned.
101
102       See also parse() and QXmlInputSource::next().
103

void QXmlSimpleReader::setFeature ( const QString & name, bool value )

105       [virtual]
106       Sets the state of the feature name to value:
107
108       If the feature is not recognized, it is ignored.
109
110       The following features are supported: <center>.nf
111
112       </center>
113
114           ** $Id: qt/tagreader.cpp   3.3.8   edited Jan 11 14:46 $
115
116               reader.setFeature( "http://xml.org/sax/features/namespace-prefixes",
117                                  TRUE );
118
119       (Code taken from xml/tagreader-with-features/tagreader.cpp)
120
121       See also feature() and hasFeature().
122
123       Example: xml/tagreader-with-features/tagreader.cpp.
124
125       Reimplemented from QXmlReader.
126
127

SEE ALSO

129       http://doc.trolltech.com/qxmlsimplereader.html
130       http://www.trolltech.com/faq/tech.html
131
133       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
134       license file included in the distribution for a complete license
135       statement.
136

AUTHOR

138       Generated automatically from the source code.
139

BUGS

141       If you find a bug in Qt, please report it as described in
142       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
143       help you. Thank you.
144
145       The definitive Qt documentation is provided in HTML format; it is
146       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
147       web browser. This man page is provided as a convenience for those users
148       who prefer man pages, although this format is not officially supported
149       by Trolltech.
150
151       If you find errors in this manual page, please report them to qt-
152       bugs@trolltech.com.  Please include the name of the manual page
153       (qxmlsimplereader.3qt) and the Qt version (3.3.8).
154
155
156
157Trolltech AS                    2 February 2007          QXmlSimpleReader(3qt)
Impressum