⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qxmlsimplereader.html

📁 QT 下载资料仅供参考
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/reggie/tmp/qt-3.0-reggie-5401/qt-x11-commercial-3.0.5/src/xml/qxml.cpp:2329 --><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 XMLreader (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 XMLreader (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> See the<a href="xml-sax-walkthrough.html">tiny SAX2 parser walkthrough.</a><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:<ul><li> <em>http://xml.org/sax/features/namespaces</em> TRUE<li> <em>http://xml.org/sax/features/namespace-prefixes</em> FALSE<li> <em>http://trolltech.com/xml/features/report-whitespace-only-CharData</em> TRUE<li> <em>http://trolltech.com/xml/features/report-start-end-entity</em> FALSE</ul><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 theparsing detects an error; otherwise returns TRUE.<p> If <em>incremental</em> is TRUE, the parser does not return FALSE when itreaches the end of the <em>input</em> without reaching the end of the XMLfile. Instead it stores the state of the parser so that parsing canbe continued at a later stage when more data is available. You canuse the function <a href="#parseContinue">parseContinue</a>() to continue with parsing. Thisclass stores a pointer to the input source <em>input</em> and theparseContinue() tries to read from that input souce. This means youshould not delete the input source <em>input</em> until you've finishedyour calls to parseContinue(). If you call this function with <em>incremental</em> TRUE whilst an incremental parse is in progress a newparsing session will be started and the previous session lost.<p> If <em>incremental</em> is FALSE, this function behaves like the normal parsefunction, i.e. it returns FALSE when the end of input is reached withoutreaching the end of the XML file and the parsing can't 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#x1962">xml/tagreader-with-features/tagreader.cpp</a> and <a href="tagreader-example.html#x1894">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 usethis function, you <em>must</em> have called parse() with the incrementalargument 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 isreached; this is quite important, especially if you want to use the reader toparse more than one XML file.<p> The case that the end of the XML file is reached without having finished theparsing is not considered as an error -- you can continue parsing at a laterstage by calling this function again when there is more data available toparse.<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. Ifthe 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.0.5</div></table></div></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -