You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tqt3/doc/html/qxmllexicalhandler.html

178 lines
9.5 KiB

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/xml/qxml.cpp:1651 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>TQXmlLexicalHandler Class</title>
<style type="text/css"><!--
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>TQXmlLexicalHandler Class Reference<br><small>[<a href="xml.html">XML module</a>]</small></h1>
<p>The TQXmlLexicalHandler class provides an interface to
report the lexical content of XML data.
<a href="#details">More...</a>
<p>All the functions in this class are <a href="threads.html#reentrant">reentrant</a> when TQt is built with thread support.</p>
<p><tt>#include &lt;<a href="qxml-h.html">qxml.h</a>&gt;</tt>
<p>Inherited by <a href="qxmldefaulthandler.html">TQXmlDefaultHandler</a>.
<p><a href="qxmllexicalhandler-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li class=fn>virtual bool <a href="#startDTD"><b>startDTD</b></a> ( const&nbsp;TQString&nbsp;&amp;&nbsp;name, const&nbsp;TQString&nbsp;&amp;&nbsp;publicId, const&nbsp;TQString&nbsp;&amp;&nbsp;systemId ) = 0</li>
<li class=fn>virtual bool <a href="#endDTD"><b>endDTD</b></a> () = 0</li>
<li class=fn>virtual bool <a href="#startEntity"><b>startEntity</b></a> ( const&nbsp;TQString&nbsp;&amp;&nbsp;name ) = 0</li>
<li class=fn>virtual bool <a href="#endEntity"><b>endEntity</b></a> ( const&nbsp;TQString&nbsp;&amp;&nbsp;name ) = 0</li>
<li class=fn>virtual bool <a href="#startCDATA"><b>startCDATA</b></a> () = 0</li>
<li class=fn>virtual bool <a href="#endCDATA"><b>endCDATA</b></a> () = 0</li>
<li class=fn>virtual bool <a href="#comment"><b>comment</b></a> ( const&nbsp;TQString&nbsp;&amp;&nbsp;ch ) = 0</li>
<li class=fn>virtual TQString <a href="#errorString"><b>errorString</b></a> () = 0</li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>
The TQXmlLexicalHandler class provides an interface to
report the lexical content of XML data.
<p>
<p> The events in the lexical handler apply to the entire document,
not just to the document element, and all lexical handler events
appear between the content handler's startDocument and endDocument
events.
<p> You can set the lexical handler with
<a href="qxmlreader.html#setLexicalHandler">TQXmlReader::setLexicalHandler</a>().
<p> This interface's design is based on the the SAX2 extension
LexicalHandler.
<p> The interface provides the <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">TQXmlDTDHandler</a>, <a href="qxmldeclhandler.html">TQXmlDeclHandler</a>, <a href="qxmlcontenthandler.html">TQXmlContentHandler</a>, <a href="qxmlentityresolver.html">TQXmlEntityResolver</a>, <a href="qxmlerrorhandler.html">TQXmlErrorHandler</a>, and <a href="xml-tools.html">XML</a>.
<hr><h2>Member Function Documentation</h2>
<h3 class=fn>bool <a name="comment"></a>TQXmlLexicalHandler::comment ( const&nbsp;<a href="qstring.html">TQString</a>&nbsp;&amp;&nbsp;ch )<tt> [pure virtual]</tt>
</h3>
<p> The reader calls this function to report an XML comment anywhere
in the document. It reports the text of the comment in <em>ch</em>.
<p> If this function returns FALSE the reader stops parsing and
reports an error. The reader uses the function <a href="#errorString">errorString</a>() to
get the error message.
<h3 class=fn>bool <a name="endCDATA"></a>TQXmlLexicalHandler::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 reports
an error. The reader uses the function <a href="#errorString">errorString</a>() to get the error
message.
<p> <p>See also <a href="#startCDATA">startCDATA</a>() and <a href="qxmlcontenthandler.html#characters">TQXmlContentHandler::characters</a>().
<h3 class=fn>bool <a name="endDTD"></a>TQXmlLexicalHandler::endDTD ()<tt> [pure virtual]</tt>
</h3>
<p> The reader calls this function to report the end of a DTD
declaration, if any.
<p> If this function returns FALSE the reader stops parsing and
reports an error. The reader uses the function <a href="#errorString">errorString</a>() to
get the error message.
<p> <p>See also <a href="#startDTD">startDTD</a>().
<h3 class=fn>bool <a name="endEntity"></a>TQXmlLexicalHandler::endEntity ( const&nbsp;<a href="qstring.html">TQString</a>&nbsp;&amp;&nbsp;name )<tt> [pure virtual]</tt>
</h3>
<p> The reader calls this function to report the end of an entity
called <em>name</em>.
<p> For every <a href="#startEntity">startEntity</a>() call, there is a corresponding <a href="#endEntity">endEntity</a>()
call. The calls to startEntity() and endEntity() are properly
nested.
<p> If this function returns FALSE the reader stops parsing and
reports an error. The reader uses the function <a href="#errorString">errorString</a>() to
get the error message.
<p> <p>See also <a href="#startEntity">startEntity</a>(), <a href="qxmlcontenthandler.html#skippedEntity">TQXmlContentHandler::skippedEntity</a>(), and <a href="qxmlsimplereader.html#setFeature">TQXmlSimpleReader::setFeature</a>().
<h3 class=fn><a href="qstring.html">TQString</a> <a name="errorString"></a>TQXmlLexicalHandler::errorString ()<tt> [pure virtual]</tt>
</h3>
<p> The reader calls this function to get an error string if any of
the handler functions returns FALSE.
<h3 class=fn>bool <a name="startCDATA"></a>TQXmlLexicalHandler::startCDATA ()<tt> [pure virtual]</tt>
</h3>
<p> The reader calls this function to report the start of a CDATA
section. The content of the CDATA section is reported through the
<a href="qxmlcontenthandler.html#characters">TQXmlContentHandler::characters</a>() function. This function is
intended only to report the boundary.
<p> If this function returns FALSE the reader stops parsing and
reports an error. The reader uses the function <a href="#errorString">errorString</a>() to
get the error message.
<p> <p>See also <a href="#endCDATA">endCDATA</a>().
<h3 class=fn>bool <a name="startDTD"></a>TQXmlLexicalHandler::startDTD ( const&nbsp;<a href="qstring.html">TQString</a>&nbsp;&amp;&nbsp;name, const&nbsp;<a href="qstring.html">TQString</a>&nbsp;&amp;&nbsp;publicId, const&nbsp;<a href="qstring.html">TQString</a>&nbsp;&amp;&nbsp;systemId )<tt> [pure virtual]</tt>
</h3>
<p> The reader calls this function to report the start of a DTD
declaration, if any. It reports the name of the document type in
<em>name</em>, the public identifier in <em>publicId</em> and the system
identifier in <em>systemId</em>.
<p> If the public identifier is missing, <em>publicId</em> is set to
<a href="qstring.html#TQString-null">TQString::null</a>. If the system identifier is missing, <em>systemId</em> is
set to TQString::null. Note that it is not valid XML to have a
public identifier but no system identifier; in such cases a parse
error will occur.
<p> All declarations reported through <a href="qxmldtdhandler.html">TQXmlDTDHandler</a> or
<a href="qxmldeclhandler.html">TQXmlDeclHandler</a> appear between the <a href="#startDTD">startDTD</a>() and <a href="#endDTD">endDTD</a>() calls.
<p> If this function returns FALSE the reader stops parsing and
reports an error. The reader uses the function <a href="#errorString">errorString</a>() to
get the error message.
<p> <p>See also <a href="#endDTD">endDTD</a>().
<h3 class=fn>bool <a name="startEntity"></a>TQXmlLexicalHandler::startEntity ( const&nbsp;<a href="qstring.html">TQString</a>&nbsp;&amp;&nbsp;name )<tt> [pure virtual]</tt>
</h3>
<p> The reader calls this function to report the start of an entity
called <em>name</em>.
<p> Note that if the entity is unknown, the reader reports it through
<a href="qxmlcontenthandler.html#skippedEntity">TQXmlContentHandler::skippedEntity</a>() and not through this
function.
<p> If this function returns FALSE the reader stops parsing and
reports an error. The reader uses the function <a href="#errorString">errorString</a>() to
get the error message.
<p> <p>See also <a href="#endEntity">endEntity</a>() and <a href="qxmlsimplereader.html#setFeature">TQXmlSimpleReader::setFeature</a>().
<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">TQt toolkit</a>.
Copyright &copy; 1995-2007
<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; 2007
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
<td align=right><div align=right>TQt 3.3.8</div>
</table></div></address></body>
</html>