<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html><head><title>QXmlDeclHandler Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm } a:link { color: #004faf; text-decoration: none } a:visited { color: #672967; text-decoration: none } td.postheader { font-family: sans-serif } tr.address { font-family: sans-serif } body { background: #ffffff; color: black; } </style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></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="modules.html"><font color="#004faf">Modules</font></a></td></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> <p>Inherited by <a href="qxmldefaulthandler.html">QXmlDefaultHandler</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qxmldeclhandler.html#QXmlDeclHandler">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qxmldeclhandler.html#QXmlDeclHandler-2">__init__</a></b> (<i>self</i>, QXmlDeclHandler)</li><li><div class="fn" />bool <b><a href="qxmldeclhandler.html#attributeDecl">attributeDecl</a></b> (<i>self</i>, QString <i>eName</i>, QString <i>aName</i>, QString <i>type</i>, QString <i>valueDefault</i>, QString <i>value</i>)</li><li><div class="fn" />QString <b><a href="qxmldeclhandler.html#errorString">errorString</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qxmldeclhandler.html#externalEntityDecl">externalEntityDecl</a></b> (<i>self</i>, QString <i>name</i>, QString <i>publicId</i>, QString <i>systemId</i>)</li><li><div class="fn" />bool <b><a href="qxmldeclhandler.html#internalEntityDecl">internalEntityDecl</a></b> (<i>self</i>, QString <i>name</i>, QString <i>value</i>)</li></ul><a name="details" /><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> <hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QXmlDeclHandler" />QXmlDeclHandler.__init__ (<i>self</i>)</h3><h3 class="fn"><a name="QXmlDeclHandler-2" />QXmlDeclHandler.__init__ (<i>self</i>, <a href="qxmldeclhandler.html">QXmlDeclHandler</a>)</h3><h3 class="fn"><a name="attributeDecl" />bool QXmlDeclHandler.attributeDecl (<i>self</i>, QString <i>eName</i>, QString <i>aName</i>, QString <i>type</i>, QString <i>valueDefault</i>, QString <i>value</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><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" />QString QXmlDeclHandler.errorString (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><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" />bool QXmlDeclHandler.externalEntityDecl (<i>self</i>, QString <i>name</i>, QString <i>publicId</i>, QString <i>systemId</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><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" />bool QXmlDeclHandler.internalEntityDecl (<i>self</i>, QString <i>name</i>, QString <i>value</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><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> <address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.10.3 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt 4.8.5</td></tr></table></div></address></body></html>