<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- /tmp/qt-4.3.4-qt-1203442408707/qt-x11-opensource-src-4.3.4/src/xml/qxml.cpp --> <head> <title>Qt 4.3: QXmlDeclHandler Class Reference</title> <link href="classic.css" rel="stylesheet" type="text/css" /> </head> <body> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td> <td width="1"> </td><td class="postheader" 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="groups.html"><font color="#004faf">Grouped Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a> · <a href="functions.html"><font color="#004faf">Functions</font></a></td> <td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">QXmlDeclHandler Class Reference<br /><sup><sup>[<a href="qtxml.html">QtXml</a> module]</sup></sup></h1> <p>The QXmlDeclHandler class provides an interface to report declaration content of XML data. <a href="#details">More...</a></p> <pre> #include <QXmlDeclHandler></pre><p>Inherited by <a href="qxmldefaulthandler.html">QXmlDefaultHandler</a>.</p> <p><b>Note:</b> All the functions in this class are <a href="threads.html#reentrant">reentrant</a>.</p> <ul> <li><a href="qxmldeclhandler-members.html">List of all members, including inherited members</a></li> </ul> <a name="public-functions"></a> <h3>Public Functions</h3> <ul> <li><div class="fn"/>virtual <b><a href="qxmldeclhandler.html#dtor.QXmlDeclHandler">~QXmlDeclHandler</a></b> ()</li> <li><div class="fn"/>virtual bool <b><a href="qxmldeclhandler.html#attributeDecl">attributeDecl</a></b> ( const QString & <i>eName</i>, const QString & <i>aName</i>, const QString & <i>type</i>, const QString & <i>valueDefault</i>, const QString & <i>value</i> ) = 0</li> <li><div class="fn"/>virtual QString <b><a href="qxmldeclhandler.html#errorString">errorString</a></b> () const = 0</li> <li><div class="fn"/>virtual bool <b><a href="qxmldeclhandler.html#externalEntityDecl">externalEntityDecl</a></b> ( const QString & <i>name</i>, const QString & <i>publicId</i>, const QString & <i>systemId</i> ) = 0</li> <li><div class="fn"/>virtual bool <b><a href="qxmldeclhandler.html#internalEntityDecl">internalEntityDecl</a></b> ( const QString & <i>name</i>, const QString & <i>value</i> ) = 0</li> </ul> <a name="details"></a> <hr /> <h2>Detailed Description</h2> <p>The QXmlDeclHandler class provides an interface to report declaration content of XML data.</p> <p>You can set the declaration handler with <a href="qxmlreader.html#setDeclHandler">QXmlReader::setDeclHandler</a>().</p> <p>This interface is based on the SAX2 extension DeclHandler.</p> <p>The interface provides <a href="qxmldeclhandler.html#attributeDecl">attributeDecl</a>(), <a href="qxmldeclhandler.html#internalEntityDecl">internalEntityDecl</a>() and <a href="qxmldeclhandler.html#externalEntityDecl">externalEntityDecl</a>() functions.</p> <p>See also <a href="qxmldtdhandler.html">QXmlDTDHandler</a>, <a href="qxmlcontenthandler.html">QXmlContentHandler</a>, <a href="qxmlentityresolver.html">QXmlEntityResolver</a>, <a href="qxmlerrorhandler.html">QXmlErrorHandler</a>, <a href="qxmllexicalhandler.html">QXmlLexicalHandler</a>, and <a href="qtxml.html#introduction-to-sax2">Introduction to SAX2</a>.</p> <hr /> <h2>Member Function Documentation</h2> <h3 class="fn"><a name="dtor.QXmlDeclHandler"></a>QXmlDeclHandler::~QXmlDeclHandler () <tt> [virtual]</tt></h3> <p>Destroys the declaration handler.</p> <h3 class="fn"><a name="attributeDecl"></a>bool QXmlDeclHandler::attributeDecl ( const <a href="qstring.html">QString</a> & <i>eName</i>, const <a href="qstring.html">QString</a> & <i>aName</i>, const <a href="qstring.html">QString</a> & <i>type</i>, const <a href="qstring.html">QString</a> & <i>valueDefault</i>, const <a href="qstring.html">QString</a> & <i>value</i> ) <tt> [pure virtual]</tt></h3> <p>The reader calls this function to report an attribute type declaration. Only the effective (first) declaration for an attribute is reported.</p> <p>The reader passes the name of the associated element in <i>eName</i> and the name of the attribute in <i>aName</i>. It passes a string that represents the attribute type in <i>type</i> and a string that represents the attribute default in <i>valueDefault</i>. This string is one of "#IMPLIED", "#REQUIRED", "#FIXED" or an empty string (if none of the others applies). The reader passes the attribute's default value in <i>value</i>. If no default value is specified in the XML file, <i>value</i> is an empty string.</p> <p>If this function returns false the reader stops parsing and reports an error. The reader uses the function <a href="qxmldeclhandler.html#errorString">errorString</a>() to get the error message.</p> <h3 class="fn"><a name="errorString"></a><a href="qstring.html">QString</a> QXmlDeclHandler::errorString () const <tt> [pure virtual]</tt></h3> <p>The reader calls this function to get an error string if any of the handler functions returns false.</p> <h3 class="fn"><a name="externalEntityDecl"></a>bool QXmlDeclHandler::externalEntityDecl ( const <a href="qstring.html">QString</a> & <i>name</i>, const <a href="qstring.html">QString</a> & <i>publicId</i>, const <a href="qstring.html">QString</a> & <i>systemId</i> ) <tt> [pure virtual]</tt></h3> <p>The reader calls this function to report a parsed external entity declaration. Only the effective (first) declaration for each entity is reported.</p> <p>The reader passes the name of the entity in <i>name</i>, the public identifier in <i>publicId</i> and the system identifier in <i>systemId</i>. If there is no public identifier specified, it passes an empty string in <i>publicId</i>.</p> <p>If this function returns false the reader stops parsing and reports an error. The reader uses the function <a href="qxmldeclhandler.html#errorString">errorString</a>() to get the error message.</p> <h3 class="fn"><a name="internalEntityDecl"></a>bool QXmlDeclHandler::internalEntityDecl ( const <a href="qstring.html">QString</a> & <i>name</i>, const <a href="qstring.html">QString</a> & <i>value</i> ) <tt> [pure virtual]</tt></h3> <p>The reader calls this function to report an internal entity declaration. Only the effective (first) declaration is reported.</p> <p>The reader passes the name of the entity in <i>name</i> and the value of the entity in <i>value</i>.</p> <p>If this function returns false the reader stops parsing and reports an error. The reader uses the function <a href="qxmldeclhandler.html#errorString">errorString</a>() to get the error message.</p> <p /><address><hr /><div align="center"> <table width="100%" cellspacing="0" border="0"><tr class="address"> <td width="30%">Copyright © 2008 <a href="trolltech.html">Trolltech</a></td> <td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td> <td width="30%" align="right"><div align="right">Qt 4.3.4</div></td> </tr></table></div></address></body> </html>