qxmllexicalhandler.html
来自「QT 下载资料仅供参考」· HTML 代码 · 共 167 行
HTML
167 行
<!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:1550 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>QXmlLexicalHandler 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 Classes</font></a> | <a href="mainclasses.html"><font color="#004faf">Main Classes</font></a> | <a href="annotated.html"><font color="#004faf">Annotated</font></a> | <a href="groups.html"><font color="#004faf">Grouped 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>QXmlLexicalHandler Class Reference<br><small>[<a href="xml.html">XML module</a>]</small></h1><p>The QXmlLexicalHandler class provides an interface to reportthe lexical content of XML data.<a href="#details">More...</a><p><tt>#include <<a href="qxml-h.html">qxml.h</a>></tt><p>Inherited by <a href="qxmldefaulthandler.html">QXmlDefaultHandler</a>.<p><a href="qxmllexicalhandler-members.html">List of all member functions.</a><h2>Public Members</h2><ul><li><div class=fn>virtual bool <a href="#startDTD"><b>startDTD</b></a> ( const QString & name, const QString & publicId, const QString & systemId ) = 0</div></li><li><div class=fn>virtual bool <a href="#endDTD"><b>endDTD</b></a> () = 0</div></li><li><div class=fn>virtual bool <a href="#startEntity"><b>startEntity</b></a> ( const QString & name ) = 0</div></li><li><div class=fn>virtual bool <a href="#endEntity"><b>endEntity</b></a> ( const QString & name ) = 0</div></li><li><div class=fn>virtual bool <a href="#startCDATA"><b>startCDATA</b></a> () = 0</div></li><li><div class=fn>virtual bool <a href="#endCDATA"><b>endCDATA</b></a> () = 0</div></li><li><div class=fn>virtual bool <a href="#comment"><b>comment</b></a> ( const QString & ch ) = 0</div></li><li><div class=fn>virtual QString <a href="#errorString"><b>errorString</b></a> () = 0</div></li></ul><hr><a name="details"></a><h2>Detailed Description</h2>The QXmlLexicalHandler class provides an interface to reportthe lexical content of XML data.<p> <p> The events in the lexical handler apply to the entire document, not just tothe document element, and all lexical handler events appear between thecontent handler's startDocument and endDocument events.<p> You can set the lexical handler with <a href="qxmlreader.html#setLexicalHandler">QXmlReader::setLexicalHandler</a>().<p> This interface's design is based on the the SAX2 extensionLexicalHandler.<p> The interface provides <a href="#startDTD">startDTD</a>(), <a href="#endDTD">endDTD</a>(), <a href="#startEntity">startEntity</a>(),<a href="#endEntity">endEntity</a>(), <a href="#startCDATA">startCDATA</a>(), <a href="#endCDATA">endCDATA</a>() and <a href="#comment">comment</a>() functions.<p> See also the <a href="xml.html#sax2Intro">Introduction to SAX2</a>.<p> <p>See also <a href="qxmldtdhandler.html">QXmlDTDHandler</a>, <a href="qxmldeclhandler.html">QXmlDeclHandler</a>, <a href="qxmlcontenthandler.html">QXmlContentHandler</a>, <a href="qxmlentityresolver.html">QXmlEntityResolver</a>, <a href="qxmlerrorhandler.html">QXmlErrorHandler</a> and <a href="xml-tools.html">XML</a>.<hr><h2>Member Function Documentation</h2><h3 class=fn>bool <a name="comment"></a>QXmlLexicalHandler::comment ( const <a href="qstring.html">QString</a> & ch )<tt> [pure virtual]</tt></h3><p> The reader calls this function to report an XML comment anywhere in thedocument. It reports the text of the comment in <em>ch</em>.<p> If this function returns FALSE the reader stops parsing and reportsan error. The reader uses the function <a href="#errorString">errorString</a>() to get the errormessage.<h3 class=fn>bool <a name="endCDATA"></a>QXmlLexicalHandler::endCDATA ()<tt> [pure virtual]</tt></h3><p> The reader calls this function to report the end of a CDATA section.<p> If this function returns FALSE the reader stops parsing and reportsan error. The reader uses the function <a href="#errorString">errorString</a>() to get the errormessage.<p> <p>See also <a href="#startCDATA">startCDATA</a>().<h3 class=fn>bool <a name="endDTD"></a>QXmlLexicalHandler::endDTD ()<tt> [pure virtual]</tt></h3><p> The reader calls this function to report the end of a DTD declaration, ifany.<p> If this function returns FALSE the reader stops parsing and reportsan error. The reader uses the function <a href="#errorString">errorString</a>() to get the errormessage.<p> <p>See also <a href="#startDTD">startDTD</a>().<h3 class=fn>bool <a name="endEntity"></a>QXmlLexicalHandler::endEntity ( const <a href="qstring.html">QString</a> & name )<tt> [pure virtual]</tt></h3><p> The reader calls this function to report the end of an entity with the name<em>name</em>.<p> For every call of <a href="#startEntity">startEntity</a>(), there is a corresponding call of<a href="#endEntity">endEntity</a>(). The calls of startEntity() and endEntity() are properlynested.<p> If this function returns FALSE the reader stops parsing and reportsan error. The reader uses the function <a href="#errorString">errorString</a>() to get the errormessage.<p> <p>See also <a href="#startEntity">startEntity</a>() and <a href="qxmlreader.html#setFeature">QXmlSimpleReader::setFeature</a>().<h3 class=fn><a href="qstring.html">QString</a> <a name="errorString"></a>QXmlLexicalHandler::errorString ()<tt> [pure virtual]</tt></h3><p> The reader calls this function to get an error string if any of the handlerfunctions returns FALSE.<h3 class=fn>bool <a name="startCDATA"></a>QXmlLexicalHandler::startCDATA ()<tt> [pure virtual]</tt></h3><p> The reader calls this function to report the start of a CDATA section. Thecontent of the CDATA section is reported through the<a href="qxmlcontenthandler.html#characters">QXmlContentHandler::characters</a>() function. This function is intendedonly to report the boundary.<p> If this function returns FALSE the reader stops parsing and reportsan error. The reader uses the function <a href="#errorString">errorString</a>() to get the errormessage.<p> <p>See also <a href="#endCDATA">endCDATA</a>().<h3 class=fn>bool <a name="startDTD"></a>QXmlLexicalHandler::startDTD ( const <a href="qstring.html">QString</a> & name, const <a href="qstring.html">QString</a> & publicId, const <a href="qstring.html">QString</a> & systemId )<tt> [pure virtual]</tt></h3><p> The reader calls this function to report the start of a DTD declaration, ifany. It reports the name of the document type in <em>name</em>, the publicidentifier in <em>publicId</em> and the system identifier in <em>systemId</em>.<p> If the public identifier and the system identifier is missing, the readersets the <em>publicId</em> and <em>systemId</em> to <a href="qstring.html#QString-null">QString::null</a>.<p> All declarations reported through <a href="qxmldtdhandler.html">QXmlDTDHandler</a> or <a href="qxmldeclhandler.html">QXmlDeclHandler</a> appearbetween the <a href="#startDTD">startDTD</a>() and <a href="#endDTD">endDTD</a>() calls.<p> If this function returns FALSE the reader stops parsing and reportsan error. The reader uses the function <a href="#errorString">errorString</a>() to get the errormessage.<p> <p>See also <a href="#endDTD">endDTD</a>().<h3 class=fn>bool <a name="startEntity"></a>QXmlLexicalHandler::startEntity ( const <a href="qstring.html">QString</a> & name )<tt> [pure virtual]</tt></h3><p> The reader calls this function to report the start of an entity with the name<em>name</em>.<p> Note that if the entity is unknown, the reader reports it through<a href="qxmlcontenthandler.html#skippedEntity">QXmlContentHandler::skippedEntity</a>() and not throught this function.<p> If this function returns FALSE the reader stops parsing and reportsan error. The reader uses the function <a href="#errorString">errorString</a>() to get the errormessage.<p> <p>See also <a href="#endEntity">endEntity</a>() and <a href="qxmlreader.html#setFeature">QXmlSimpleReader::setFeature</a>().<!-- eof --><hr><p>This file is part of the <a href="index.html">Qt toolkit</a>.Copyright © 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 © 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 + =
减小字号Ctrl + -
显示快捷键?