source: trunk/doc/html/qxmllexicalhandler.html@ 190

Last change on this file since 190 was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 9.7 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/xml/qxml.cpp:1651 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QXmlLexicalHandler Class</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { background: #ffffff; color: black; }
12--></style>
13</head>
14<body>
15
16<table border="0" cellpadding="0" cellspacing="0" width="100%">
17<tr bgcolor="#E5E5E5">
18<td valign=center>
19 <a href="index.html">
20<font color="#004faf">Home</font></a>
21 | <a href="classes.html">
22<font color="#004faf">All&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;Classes</font></a>
25 | <a href="annotated.html">
26<font color="#004faf">Annotated</font></a>
27 | <a href="groups.html">
28<font color="#004faf">Grouped&nbsp;Classes</font></a>
29 | <a href="functions.html">
30<font color="#004faf">Functions</font></a>
31</td>
32<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>
33
34<p>The QXmlLexicalHandler class provides an interface to
35report the lexical content of XML data.
36<a href="#details">More...</a>
37<p>All the functions in this class are <a href="threads.html#reentrant">reentrant</a> when Qt is built with thread support.</p>
38<p><tt>#include &lt;<a href="qxml-h.html">qxml.h</a>&gt;</tt>
39<p>Inherited by <a href="qxmldefaulthandler.html">QXmlDefaultHandler</a>.
40<p><a href="qxmllexicalhandler-members.html">List of all member functions.</a>
41<h2>Public Members</h2>
42<ul>
43<li class=fn>virtual bool <a href="#startDTD"><b>startDTD</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;name, const&nbsp;QString&nbsp;&amp;&nbsp;publicId, const&nbsp;QString&nbsp;&amp;&nbsp;systemId ) = 0</li>
44<li class=fn>virtual bool <a href="#endDTD"><b>endDTD</b></a> () = 0</li>
45<li class=fn>virtual bool <a href="#startEntity"><b>startEntity</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;name ) = 0</li>
46<li class=fn>virtual bool <a href="#endEntity"><b>endEntity</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;name ) = 0</li>
47<li class=fn>virtual bool <a href="#startCDATA"><b>startCDATA</b></a> () = 0</li>
48<li class=fn>virtual bool <a href="#endCDATA"><b>endCDATA</b></a> () = 0</li>
49<li class=fn>virtual bool <a href="#comment"><b>comment</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;ch ) = 0</li>
50<li class=fn>virtual QString <a href="#errorString"><b>errorString</b></a> () = 0</li>
51</ul>
52<hr><a name="details"></a><h2>Detailed Description</h2>
53
54
55
56The QXmlLexicalHandler class provides an interface to
57report the lexical content of XML data.
58
59<p>
60
61<p> The events in the lexical handler apply to the entire document,
62not just to the document element, and all lexical handler events
63appear between the content handler's startDocument and endDocument
64events.
65<p> You can set the lexical handler with
66<a href="qxmlreader.html#setLexicalHandler">QXmlReader::setLexicalHandler</a>().
67<p> This interface's design is based on the the SAX2 extension
68LexicalHandler.
69<p> The interface provides the <a href="#startDTD">startDTD</a>(), <a href="#endDTD">endDTD</a>(), <a href="#startEntity">startEntity</a>(),
70<a href="#endEntity">endEntity</a>(), <a href="#startCDATA">startCDATA</a>(), <a href="#endCDATA">endCDATA</a>() and <a href="#comment">comment</a>() functions.
71<p> See also the <a href="xml.html#sax2Intro">Introduction to SAX2</a>.
72<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>.
73
74<hr><h2>Member Function Documentation</h2>
75<h3 class=fn>bool <a name="comment"></a>QXmlLexicalHandler::comment ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;ch )<tt> [pure virtual]</tt>
76</h3>
77
78<p> The reader calls this function to report an XML comment anywhere
79in the document. It reports the text of the comment in <em>ch</em>.
80<p> If this function returns FALSE the reader stops parsing and
81reports an error. The reader uses the function <a href="#errorString">errorString</a>() to
82get the error message.
83
84<h3 class=fn>bool <a name="endCDATA"></a>QXmlLexicalHandler::endCDATA ()<tt> [pure virtual]</tt>
85</h3>
86
87<p> The reader calls this function to report the end of a CDATA
88section.
89<p> If this function returns FALSE the reader stops parsing and reports
90an error. The reader uses the function <a href="#errorString">errorString</a>() to get the error
91message.
92<p> <p>See also <a href="#startCDATA">startCDATA</a>() and <a href="qxmlcontenthandler.html#characters">QXmlContentHandler::characters</a>().
93
94<h3 class=fn>bool <a name="endDTD"></a>QXmlLexicalHandler::endDTD ()<tt> [pure virtual]</tt>
95</h3>
96
97<p> The reader calls this function to report the end of a DTD
98declaration, if any.
99<p> If this function returns FALSE the reader stops parsing and
100reports an error. The reader uses the function <a href="#errorString">errorString</a>() to
101get the error message.
102<p> <p>See also <a href="#startDTD">startDTD</a>().
103
104<h3 class=fn>bool <a name="endEntity"></a>QXmlLexicalHandler::endEntity ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;name )<tt> [pure virtual]</tt>
105</h3>
106
107<p> The reader calls this function to report the end of an entity
108called <em>name</em>.
109<p> For every <a href="#startEntity">startEntity</a>() call, there is a corresponding <a href="#endEntity">endEntity</a>()
110call. The calls to startEntity() and endEntity() are properly
111nested.
112<p> If this function returns FALSE the reader stops parsing and
113reports an error. The reader uses the function <a href="#errorString">errorString</a>() to
114get the error message.
115<p> <p>See also <a href="#startEntity">startEntity</a>(), <a href="qxmlcontenthandler.html#skippedEntity">QXmlContentHandler::skippedEntity</a>(), and <a href="qxmlsimplereader.html#setFeature">QXmlSimpleReader::setFeature</a>().
116
117<h3 class=fn><a href="qstring.html">QString</a> <a name="errorString"></a>QXmlLexicalHandler::errorString ()<tt> [pure virtual]</tt>
118</h3>
119
120<p> The reader calls this function to get an error string if any of
121the handler functions returns FALSE.
122
123<h3 class=fn>bool <a name="startCDATA"></a>QXmlLexicalHandler::startCDATA ()<tt> [pure virtual]</tt>
124</h3>
125
126<p> The reader calls this function to report the start of a CDATA
127section. The content of the CDATA section is reported through the
128<a href="qxmlcontenthandler.html#characters">QXmlContentHandler::characters</a>() function. This function is
129intended only to report the boundary.
130<p> If this function returns FALSE the reader stops parsing and
131reports an error. The reader uses the function <a href="#errorString">errorString</a>() to
132get the error message.
133<p> <p>See also <a href="#endCDATA">endCDATA</a>().
134
135<h3 class=fn>bool <a name="startDTD"></a>QXmlLexicalHandler::startDTD ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;name, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;publicId, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;systemId )<tt> [pure virtual]</tt>
136</h3>
137
138<p> The reader calls this function to report the start of a DTD
139declaration, if any. It reports the name of the document type in
140<em>name</em>, the public identifier in <em>publicId</em> and the system
141identifier in <em>systemId</em>.
142<p> If the public identifier is missing, <em>publicId</em> is set to
143<a href="qstring.html#QString-null">QString::null</a>. If the system identifier is missing, <em>systemId</em> is
144set to QString::null. Note that it is not valid XML to have a
145public identifier but no system identifier; in such cases a parse
146error will occur.
147<p> All declarations reported through <a href="qxmldtdhandler.html">QXmlDTDHandler</a> or
148<a href="qxmldeclhandler.html">QXmlDeclHandler</a> appear between the <a href="#startDTD">startDTD</a>() and <a href="#endDTD">endDTD</a>() calls.
149<p> If this function returns FALSE the reader stops parsing and
150reports an error. The reader uses the function <a href="#errorString">errorString</a>() to
151get the error message.
152<p> <p>See also <a href="#endDTD">endDTD</a>().
153
154<h3 class=fn>bool <a name="startEntity"></a>QXmlLexicalHandler::startEntity ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;name )<tt> [pure virtual]</tt>
155</h3>
156
157<p> The reader calls this function to report the start of an entity
158called <em>name</em>.
159<p> Note that if the entity is unknown, the reader reports it through
160<a href="qxmlcontenthandler.html#skippedEntity">QXmlContentHandler::skippedEntity</a>() and not through this
161function.
162<p> If this function returns FALSE the reader stops parsing and
163reports an error. The reader uses the function <a href="#errorString">errorString</a>() to
164get the error message.
165<p> <p>See also <a href="#endEntity">endEntity</a>() and <a href="qxmlsimplereader.html#setFeature">QXmlSimpleReader::setFeature</a>().
166
167<!-- eof -->
168<hr><p>
169This file is part of the <a href="index.html">Qt toolkit</a>.
170Copyright &copy; 1995-2007
171<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
172<table width=100% cellspacing=0 border=0><tr>
173<td>Copyright &copy; 2007
174<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
175<td align=right><div align=right>Qt 3.3.8</div>
176</table></div></address></body>
177</html>
Note: See TracBrowser for help on using the repository browser.