Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > 397cf13019f8c526877f271962f26f4c > files > 2172

libqt3-devel-3.1.1-13mdk.ppc.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /home/reggie/tmp/qt-3.1-reggie-23625/qt-x11-free-3.1.1/src/xml/qxml.cpp:2491 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>QXmlSimpleReader Class</title>
<style type="text/css"><!--
h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
--></style>
</head>
<body>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
 <a href="index.html">
<font color="#004faf">Home</font></a>
 | <a href="classes.html">
<font color="#004faf">All&nbsp;Classes</font></a>
 | <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
 | <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
 | <a href="groups.html">
<font color="#004faf">Grouped&nbsp;Classes</font></a>
 | <a href="functions.html">
<font color="#004faf">Functions</font></a>
</td>
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QXmlSimpleReader Class Reference<br><small>[<a href="xml.html">XML module</a>]</small></h1>

<p>The QXmlSimpleReader class provides an implementation of a
simple XML reader (parser).
<a href="#details">More...</a>
<p><tt>#include &lt;<a href="qxml-h.html">qxml.h</a>&gt;</tt>
<p>Inherits <a href="qxmlreader.html">QXmlReader</a>.
<p><a href="qxmlsimplereader-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><div class=fn><a href="#QXmlSimpleReader"><b>QXmlSimpleReader</b></a> ()</div></li>
<li><div class=fn>virtual <a href="#~QXmlSimpleReader"><b>~QXmlSimpleReader</b></a> ()</div></li>
<li><div class=fn>virtual bool <a href="#parse"><b>parse</b></a> ( const&nbsp;QXmlInputSource&nbsp;*&nbsp;input, bool&nbsp;incremental )</div></li>
<li><div class=fn>virtual bool <a href="#parseContinue"><b>parseContinue</b></a> ()</div></li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>


The QXmlSimpleReader class provides an implementation of a
simple XML reader (parser).
<p> 


<p> This XML reader is sufficient for simple parsing tasks. The reader:
<ul>
<li> provides a well-formed parser;
<li> does not parse any external entities;
<li> can do namespace processing.
</ul>
<p> Documents are parsed with a call to <a href="#parse">parse</a>().
<p> <p>See also <a href="xml-tools.html">XML</a>.

<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="QXmlSimpleReader"></a>QXmlSimpleReader::QXmlSimpleReader ()
</h3>
Constructs a simple XML reader with the following feature settings:
<center><table cellpadding="4" cellspacing="2" border="0">
<tr bgcolor="#a2c511"> <th valign="top">Feature <th valign="top">Setting
<tr bgcolor="#f0f0f0"> <td valign="top"><em>http://xml.org/sax/features/namespaces</em> <td valign="top">TRUE
<tr bgcolor="#d0d0d0"> <td valign="top"><em>http://xml.org/sax/features/namespace-prefixes</em> <td valign="top">FALSE
<tr bgcolor="#f0f0f0"> <td valign="top"><em>http://trolltech.com/xml/features/report-whitespace-only-CharData</em>
<td valign="top">TRUE
<tr bgcolor="#d0d0d0"> <td valign="top"><em>http://trolltech.com/xml/features/report-start-end-entity</em> <td valign="top">FALSE
</table></center>
<p> More information about features can be found in the <a href="xml.html#sax2Features">Qt SAX2 overview.</a>
<p> <p>See also <a href="qxmlreader.html#setFeature">setFeature</a>().

<h3 class=fn><a name="~QXmlSimpleReader"></a>QXmlSimpleReader::~QXmlSimpleReader ()<tt> [virtual]</tt>
</h3>
Destroys the simple XML reader.

<h3 class=fn>bool <a name="parse"></a>QXmlSimpleReader::parse ( const&nbsp;<a href="qxmlinputsource.html">QXmlInputSource</a>&nbsp;*&nbsp;input, bool&nbsp;incremental )<tt> [virtual]</tt>
</h3>
Reads an XML document from <em>input</em> and parses it. Returns FALSE
if the parsing detects an error; otherwise returns TRUE.
<p> If <em>incremental</em> is TRUE, the parser does not return FALSE when
it reaches the end of the <em>input</em> without reaching the end of the
XML file. Instead it stores the state of the parser so that
parsing can be continued at a later stage when more data is
available. You can use the function <a href="#parseContinue">parseContinue</a>() to continue
with parsing. This class stores a pointer to the input source <em>input</em> and the parseContinue() tries to read from that input souce.
This means you should not delete the input source <em>input</em> until
you've finished your calls to parseContinue(). If you call this
function with <em>incremental</em> TRUE whilst an incremental parse is
in progress a new parsing session will be started and the previous
session lost.
<p> If <em>incremental</em> is FALSE, this function behaves like the normal
parse function, i.e. it returns FALSE when the end of input is
reached without reaching the end of the XML file and the parsing
cannot be continued.
<p> <p>See also <a href="#parseContinue">parseContinue</a>() and <a href="qsocket.html">QSocket</a>.

<p>Examples: <a href="tagreader-with-features-example.html#x1860">xml/tagreader-with-features/tagreader.cpp</a> and <a href="tagreader-example.html#x1866">xml/tagreader/tagreader.cpp</a>.
<h3 class=fn>bool <a name="parseContinue"></a>QXmlSimpleReader::parseContinue ()<tt> [virtual]</tt>
</h3>
Continues incremental parsing; this function reads the input from
the <a href="qxmlinputsource.html">QXmlInputSource</a> that was specified with the last <a href="#parse">parse</a>()
command. To use this function, you <em>must</em> have called parse()
with the incremental argument set to TRUE.
<p> Returns FALSE if a parsing error occurs; otherwise returns TRUE.
<p> If the input source returns an empty string for the function
<a href="qxmlinputsource.html#data">QXmlInputSource::data</a>(), then this means that the end of the XML
file has been reached; this is quite important, especially if you
want to use the reader to parse more than one XML file.
<p> The case of the end of the XML file being reached without having
finished parsing is not considered to be an error: you can
continue parsing at a later stage by calling this function again
when there is more data available to parse.
<p> This function assumes that the end of the XML document is reached
if the <a href="qxmlinputsource.html#next">QXmlInputSource::next</a>() function returns
QXmlInputSource::EndOfDocument. If the parser has not finished
parsing when it encounters this symbol, it is an error and FALSE
is returned.
<p> <p>See also <a href="#parse">parse</a>() and <a href="qxmlinputsource.html#next">QXmlInputSource::next</a>().

<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>.
Copyright &copy; 1995-2002
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright &copy; 2002 
<a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align=right><div align=right>Qt version 3.1.1</div>
</table></div></address></body>
</html>