Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 1298

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?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>QXmlContentHandler 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">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QXmlContentHandler Class Reference<br /><sup><sup>[<a href="qtxml.html">QtXml</a> module]</sup></sup></h1><p>The QXmlContentHandler class provides an interface to report the
logical 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="qxmlcontenthandler.html#QXmlContentHandler">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qxmlcontenthandler.html#QXmlContentHandler-2">__init__</a></b> (<i>self</i>, QXmlContentHandler)</li><li><div class="fn" />bool <b><a href="qxmlcontenthandler.html#characters">characters</a></b> (<i>self</i>, QString&#160;<i>ch</i>)</li><li><div class="fn" />bool <b><a href="qxmlcontenthandler.html#endDocument">endDocument</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qxmlcontenthandler.html#endElement">endElement</a></b> (<i>self</i>, QString&#160;<i>namespaceURI</i>, QString&#160;<i>localName</i>, QString&#160;<i>qName</i>)</li><li><div class="fn" />bool <b><a href="qxmlcontenthandler.html#endPrefixMapping">endPrefixMapping</a></b> (<i>self</i>, QString&#160;<i>prefix</i>)</li><li><div class="fn" />QString <b><a href="qxmlcontenthandler.html#errorString">errorString</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qxmlcontenthandler.html#ignorableWhitespace">ignorableWhitespace</a></b> (<i>self</i>, QString&#160;<i>ch</i>)</li><li><div class="fn" />bool <b><a href="qxmlcontenthandler.html#processingInstruction">processingInstruction</a></b> (<i>self</i>, QString&#160;<i>target</i>, QString&#160;<i>data</i>)</li><li><div class="fn" /><b><a href="qxmlcontenthandler.html#setDocumentLocator">setDocumentLocator</a></b> (<i>self</i>, QXmlLocator&#160;<i>locator</i>)</li><li><div class="fn" />bool <b><a href="qxmlcontenthandler.html#skippedEntity">skippedEntity</a></b> (<i>self</i>, QString&#160;<i>name</i>)</li><li><div class="fn" />bool <b><a href="qxmlcontenthandler.html#startDocument">startDocument</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qxmlcontenthandler.html#startElement">startElement</a></b> (<i>self</i>, QString&#160;<i>namespaceURI</i>, QString&#160;<i>localName</i>, QString&#160;<i>qName</i>, QXmlAttributes&#160;<i>atts</i>)</li><li><div class="fn" />bool <b><a href="qxmlcontenthandler.html#startPrefixMapping">startPrefixMapping</a></b> (<i>self</i>, QString&#160;<i>prefix</i>, QString&#160;<i>uri</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QXmlContentHandler class provides an interface to report the
logical content of XML data.</p>
<p>If the application needs to be informed of basic parsing events,
it can implement this interface and activate it using <a href="qxmlreader.html#setContentHandler">QXmlReader.setContentHandler</a>().
The reader can then report basic document-related events like the
start and end of elements and character data through this
interface.</p>
<p>The order of events in this interface is very important, and
mirrors the order of information in the document itself. For
example, all of an element's content (character data, processing
instructions, and sub-elements) appears, in order, between the
<a href="qxmlcontenthandler.html#startElement">startElement</a>()
event and the corresponding <a href="qxmlcontenthandler.html#endElement">endElement</a>() event.</p>
<p>The class <a href="qxmldefaulthandler.html">QXmlDefaultHandler</a> provides a default
implementation for this interface; subclassing from the <a href="qxmldefaulthandler.html">QXmlDefaultHandler</a> class is very
convenient if you only want to be informed of some parsing
events.</p>
<p>The <a href="qxmlcontenthandler.html#startDocument">startDocument</a>()
function is called at the start of the document, and <a href="qxmlcontenthandler.html#endDocument">endDocument</a>() is called
at the end. Before parsing begins <a href="qxmlcontenthandler.html#setDocumentLocator">setDocumentLocator</a>()
is called. For each element <a href="qxmlcontenthandler.html#startElement">startElement</a>() is
called, with <a href="qxmlcontenthandler.html#endElement">endElement</a>() being called
at the end of each element. The <a href="qxmlcontenthandler.html#characters">characters</a>() function is
called with chunks of character data; <a href="qxmlcontenthandler.html#ignorableWhitespace">ignorableWhitespace</a>()
is called with chunks of whitespace and <a href="qxmlcontenthandler.html#processingInstruction">processingInstruction</a>()
is called with processing instructions. If an entity is skipped
<a href="qxmlcontenthandler.html#skippedEntity">skippedEntity</a>()
is called. At the beginning of prefix-URI scopes <a href="qxmlcontenthandler.html#startPrefixMapping">startPrefixMapping</a>()
is called.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QXmlContentHandler" />QXmlContentHandler.__init__ (<i>self</i>)</h3><h3 class="fn"><a name="QXmlContentHandler-2" />QXmlContentHandler.__init__ (<i>self</i>, <a href="qxmlcontenthandler.html">QXmlContentHandler</a>)</h3><h3 class="fn"><a name="characters" />bool QXmlContentHandler.characters (<i>self</i>, QString&#160;<i>ch</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>The reader calls this function when it has parsed a chunk of
character data (either normal character data or character data
inside a CDATA section; if you need to distinguish between those
two types you must use <a href="qxmllexicalhandler.html#startCDATA">QXmlLexicalHandler.startCDATA</a>()
and <a href="qxmllexicalhandler.html#endCDATA">QXmlLexicalHandler.endCDATA</a>()).
The character data is reported in <i>ch</i>.</p>
<p>Some readers report whitespace in element content using the
<a href="qxmlcontenthandler.html#ignorableWhitespace">ignorableWhitespace</a>()
function rather than using this one.</p>
<p>A reader may report the character data of an element in more
than one chunk; e.g. a reader might want to report "a&lt;b" in
three characters() events ("a ", "&lt;" and " b").</p>
<p>If this function returns false the reader stops parsing and
reports an error. The reader uses the function <a href="qxmlcontenthandler.html#errorString">errorString</a>() to get the
error message.</p>


<h3 class="fn"><a name="endDocument" />bool QXmlContentHandler.endDocument (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>The reader calls this function after it has finished parsing. It
is called just once, and is the last handler function called. It is
called after the reader has read all input or has abandoned parsing
because of a fatal error.</p>
<p>If this function returns false the reader stops parsing and
reports an error. The reader uses the function <a href="qxmlcontenthandler.html#errorString">errorString</a>() to get the
error message.</p>
<p><b>See also</b> <a href="qxmlcontenthandler.html#startDocument">startDocument</a>().</p>


<h3 class="fn"><a name="endElement" />bool QXmlContentHandler.endElement (<i>self</i>, QString&#160;<i>namespaceURI</i>, QString&#160;<i>localName</i>, QString&#160;<i>qName</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>The reader calls this function when it has parsed an end element
tag with the qualified name <i>qName</i>, the local name
<i>localName</i> and the namespace URI <i>namespaceURI</i>.</p>
<p>If this function returns false the reader stops parsing and
reports an error. The reader uses the function <a href="qxmlcontenthandler.html#errorString">errorString</a>() to get the
error message.</p>
<p><b>See also</b> <a href="qxmlcontenthandler.html#startElement">startElement</a>() and
<a href="xml-sax.html#namespace-support-via-features">Namespace
Support via Features</a>.</p>


<h3 class="fn"><a name="endPrefixMapping" />bool QXmlContentHandler.endPrefixMapping (<i>self</i>, QString&#160;<i>prefix</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>The reader calls this function to signal the end of a prefix
mapping for the prefix <i>prefix</i>.</p>
<p>If this function returns false the reader stops parsing and
reports an error. The reader uses the function <a href="qxmlcontenthandler.html#errorString">errorString</a>() to get the
error message.</p>
<p><b>See also</b> <a href="qxmlcontenthandler.html#startPrefixMapping">startPrefixMapping</a>()
and <a href="xml-sax.html#namespace-support-via-features">Namespace
Support via Features</a>.</p>


<h3 class="fn"><a name="errorString" />QString QXmlContentHandler.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, e.g. if
any of the handler functions returns false.</p>


<h3 class="fn"><a name="ignorableWhitespace" />bool QXmlContentHandler.ignorableWhitespace (<i>self</i>, QString&#160;<i>ch</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Some readers may use this function to report each chunk of
whitespace in element content. The whitespace is reported in
<i>ch</i>.</p>
<p>If this function returns false the reader stops parsing and
reports an error. The reader uses the function <a href="qxmlcontenthandler.html#errorString">errorString</a>() to get the
error message.</p>


<h3 class="fn"><a name="processingInstruction" />bool QXmlContentHandler.processingInstruction (<i>self</i>, QString&#160;<i>target</i>, QString&#160;<i>data</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>The reader calls this function when it has parsed a processing
instruction.</p>
<p><i>target</i> is the target name of the processing instruction
and <i>data</i> is the data in the processing instruction.</p>
<p>If this function returns false the reader stops parsing and
reports an error. The reader uses the function <a href="qxmlcontenthandler.html#errorString">errorString</a>() to get the
error message.</p>


<h3 class="fn"><a name="setDocumentLocator" />QXmlContentHandler.setDocumentLocator (<i>self</i>, <a href="qxmllocator.html">QXmlLocator</a>&#160;<i>locator</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>The reader calls this function before it starts parsing the
document. The argument <i>locator</i> is a pointer to a <a href="qxmllocator.html">QXmlLocator</a> which allows the application to
get the parsing position within the document.</p>
<p>Do not destroy the <i>locator</i>; it is destroyed when the
reader is destroyed. (Do not use the <i>locator</i> after the
reader is destroyed).</p>


<h3 class="fn"><a name="skippedEntity" />bool QXmlContentHandler.skippedEntity (<i>self</i>, QString&#160;<i>name</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Some readers may skip entities if they have not seen the
declarations (e.g. because they are in an external DTD). If they do
so they report that they skipped the entity called <i>name</i> by
calling this function.</p>
<p>If this function returns false the reader stops parsing and
reports an error. The reader uses the function <a href="qxmlcontenthandler.html#errorString">errorString</a>() to get the
error message.</p>


<h3 class="fn"><a name="startDocument" />bool QXmlContentHandler.startDocument (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>The reader calls this function when it starts parsing the
document. The reader calls this function just once, after the call
to <a href="qxmlcontenthandler.html#setDocumentLocator">setDocumentLocator</a>(),
and before any other functions in this class or in the <a href="qxmldtdhandler.html">QXmlDTDHandler</a> class are called.</p>
<p>If this function returns false the reader stops parsing and
reports an error. The reader uses the function <a href="qxmlcontenthandler.html#errorString">errorString</a>() to get the
error message.</p>
<p><b>See also</b> <a href="qxmlcontenthandler.html#endDocument">endDocument</a>().</p>


<h3 class="fn"><a name="startElement" />bool QXmlContentHandler.startElement (<i>self</i>, QString&#160;<i>namespaceURI</i>, QString&#160;<i>localName</i>, QString&#160;<i>qName</i>, <a href="qxmlattributes.html">QXmlAttributes</a>&#160;<i>atts</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>The reader calls this function when it has parsed a start
element tag.</p>
<p>There is a corresponding <a href="qxmlcontenthandler.html#endElement">endElement</a>() call when the
corresponding end element tag is read. The startElement() and
<a href="qxmlcontenthandler.html#endElement">endElement</a>() calls
are always nested correctly. Empty element tags (e.g.
<tt>&lt;x/&gt;</tt>) cause a startElement() call to be immediately
followed by an <a href="qxmlcontenthandler.html#endElement">endElement</a>() call.</p>
<p>The attribute list provided only contains attributes with
explicit values. The attribute list contains attributes used for
namespace declaration (i.e. attributes starting with xmlns) only if
the namespace-prefix property of the reader is true.</p>
<p>The argument <i>namespaceURI</i> is the namespace URI, or an
empty string if the element has no namespace URI or if no namespace
processing is done. <i>localName</i> is the local name (without
prefix), or an empty string if no namespace processing is done,
<i>qName</i> is the qualified name (with prefix) and <i>atts</i>
are the attributes attached to the element. If there are no
attributes, <i>atts</i> is an empty attributes object.</p>
<p>If this function returns false the reader stops parsing and
reports an error. The reader uses the function <a href="qxmlcontenthandler.html#errorString">errorString</a>() to get the
error message.</p>
<p><b>See also</b> <a href="qxmlcontenthandler.html#endElement">endElement</a>() and <a href="xml-sax.html#namespace-support-via-features">Namespace Support via
Features</a>.</p>


<h3 class="fn"><a name="startPrefixMapping" />bool QXmlContentHandler.startPrefixMapping (<i>self</i>, QString&#160;<i>prefix</i>, QString&#160;<i>uri</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>The reader calls this function to signal the begin of a
prefix-URI namespace mapping scope. This information is not
necessary for normal namespace processing since the reader
automatically replaces prefixes for element and attribute
names.</p>
<p>Note that startPrefixMapping() and <a href="qxmlcontenthandler.html#endPrefixMapping">endPrefixMapping</a>()
calls are not guaranteed to be properly nested relative to each
other: all startPrefixMapping() events occur before the
corresponding <a href="qxmlcontenthandler.html#startElement">startElement</a>() event,
and all <a href="qxmlcontenthandler.html#endPrefixMapping">endPrefixMapping</a>()
events occur after the corresponding <a href="qxmlcontenthandler.html#endElement">endElement</a>() event, but
their order is not otherwise guaranteed.</p>
<p>The argument <i>prefix</i> is the namespace prefix being
declared and the argument <i>uri</i> is the namespace URI the
prefix is mapped to.</p>
<p>If this function returns false the reader stops parsing and
reports an error. The reader uses the function <a href="qxmlcontenthandler.html#errorString">errorString</a>() to get the
error message.</p>
<p><b>See also</b> <a href="qxmlcontenthandler.html#endPrefixMapping">endPrefixMapping</a>()
and <a href="xml-sax.html#namespace-support-via-features">Namespace
Support via Features</a>.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>