6
6
td.postheader { font-family: sans-serif }
7
7
tr.address { font-family: sans-serif }
8
8
body { background: #ffffff; color: black; }
9
</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="../pyqt4ref.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">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>
10
<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)</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, QString, QString)</li><li><div class="fn" />bool <b><a href="qxmlcontenthandler.html#endPrefixMapping">endPrefixMapping</a></b> (<i>self</i>, QString)</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)</li><li><div class="fn" />bool <b><a href="qxmlcontenthandler.html#processingInstruction">processingInstruction</a></b> (<i>self</i>, QString, QString)</li><li><div class="fn" /><b><a href="qxmlcontenthandler.html#setDocumentLocator">setDocumentLocator</a></b> (<i>self</i>, QXmlLocator)</li><li><div class="fn" />bool <b><a href="qxmlcontenthandler.html#skippedEntity">skippedEntity</a></b> (<i>self</i>, QString)</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, QString, QString, QXmlAttributes)</li><li><div class="fn" />bool <b><a href="qxmlcontenthandler.html#startPrefixMapping">startPrefixMapping</a></b> (<i>self</i>, QString, QString)</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>
11
<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>
12
<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>
13
<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>
14
<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>
15
<p>See also <a href="qxmldtdhandler.html">QXmlDTDHandler</a>, <a href="qxmldeclhandler.html">QXmlDeclHandler</a>, <a href="qxmlentityresolver.html">QXmlEntityResolver</a>, <a href="qxmlerrorhandler.html">QXmlErrorHandler</a>, <a href="qxmllexicalhandler.html">QXmlLexicalHandler</a>, and <a href="xml-sax.html#introduction-to-sax2">Introduction to SAX2</a>.</p>
16
<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)</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>
17
<p>Some readers report whitespace in element content using the <a href="qxmlcontenthandler.html#ignorableWhitespace">ignorableWhitespace</a>() function rather than using this one.</p>
18
<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<b" in three characters() events ("a ", "<" and " b").</p>
19
<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>
20
<a name="//apple_ref/cpp/instm/QXmlContentHandler/endDocument" />
21
<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>
22
<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>
9
</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="../pyqt4ref.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">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
10
logical content of XML data. <a href="#details">More...</a></p>
12
<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)</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, QString, QString)</li><li><div class="fn" />bool <b><a href="qxmlcontenthandler.html#endPrefixMapping">endPrefixMapping</a></b> (<i>self</i>, QString)</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)</li><li><div class="fn" />bool <b><a href="qxmlcontenthandler.html#processingInstruction">processingInstruction</a></b> (<i>self</i>, QString, QString)</li><li><div class="fn" /><b><a href="qxmlcontenthandler.html#setDocumentLocator">setDocumentLocator</a></b> (<i>self</i>, QXmlLocator)</li><li><div class="fn" />bool <b><a href="qxmlcontenthandler.html#skippedEntity">skippedEntity</a></b> (<i>self</i>, QString)</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, QString, QString, QXmlAttributes)</li><li><div class="fn" />bool <b><a href="qxmlcontenthandler.html#startPrefixMapping">startPrefixMapping</a></b> (<i>self</i>, QString, QString)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QXmlContentHandler class provides an interface to report the
13
logical content of XML data.</p>
14
<p>If the application needs to be informed of basic parsing events,
15
it can implement this interface and activate it using <a href="qxmlreader.html#setContentHandler">QXmlReader.setContentHandler</a>().
16
The reader can then report basic document-related events like the
17
start and end of elements and character data through this
19
<p>The order of events in this interface is very important, and
20
mirrors the order of information in the document itself. For
21
example, all of an element's content (character data, processing
22
instructions, and sub-elements) appears, in order, between the
23
<a href="qxmlcontenthandler.html#startElement">startElement</a>()
24
event and the corresponding <a href="qxmlcontenthandler.html#endElement">endElement</a>() event.</p>
25
<p>The class <a href="qxmldefaulthandler.html">QXmlDefaultHandler</a> provides a default
26
implementation for this interface; subclassing from the <a href="qxmldefaulthandler.html">QXmlDefaultHandler</a> class is very
27
convenient if you only want to be informed of some parsing
29
<p>The <a href="qxmlcontenthandler.html#startDocument">startDocument</a>()
30
function is called at the start of the document, and <a href="qxmlcontenthandler.html#endDocument">endDocument</a>() is called
31
at the end. Before parsing begins <a href="qxmlcontenthandler.html#setDocumentLocator">setDocumentLocator</a>()
32
is called. For each element <a href="qxmlcontenthandler.html#startElement">startElement</a>() is
33
called, with <a href="qxmlcontenthandler.html#endElement">endElement</a>() being called
34
at the end of each element. The <a href="qxmlcontenthandler.html#characters">characters</a>() function is
35
called with chunks of character data; <a href="qxmlcontenthandler.html#ignorableWhitespace">ignorableWhitespace</a>()
36
is called with chunks of whitespace and <a href="qxmlcontenthandler.html#processingInstruction">processingInstruction</a>()
37
is called with processing instructions. If an entity is skipped
38
<a href="qxmlcontenthandler.html#skippedEntity">skippedEntity</a>()
39
is called. At the beginning of prefix-URI scopes <a href="qxmlcontenthandler.html#startPrefixMapping">startPrefixMapping</a>()
41
<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)</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
42
character data (either normal character data or character data
43
inside a CDATA section; if you need to distinguish between those
44
two types you must use <a href="qxmllexicalhandler.html#startCDATA">QXmlLexicalHandler.startCDATA</a>()
45
and <a href="qxmllexicalhandler.html#endCDATA">QXmlLexicalHandler.endCDATA</a>()).
46
The character data is reported in <i>ch</i>.</p>
47
<p>Some readers report whitespace in element content using the
48
<a href="qxmlcontenthandler.html#ignorableWhitespace">ignorableWhitespace</a>()
49
function rather than using this one.</p>
50
<p>A reader may report the character data of an element in more
51
than one chunk; e.g. a reader might want to report "a<b" in
52
three characters() events ("a ", "<" and " b").</p>
53
<p>If this function returns false the reader stops parsing and
54
reports an error. The reader uses the function <a href="qxmlcontenthandler.html#errorString">errorString</a>() to get the
58
<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
59
is called just once, and is the last handler function called. It is
60
called after the reader has read all input or has abandoned parsing
61
because of a fatal error.</p>
62
<p>If this function returns false the reader stops parsing and
63
reports an error. The reader uses the function <a href="qxmlcontenthandler.html#errorString">errorString</a>() to get the
23
65
<p>See also <a href="qxmlcontenthandler.html#startDocument">startDocument</a>().</p>
24
<a name="//apple_ref/cpp/instm/QXmlContentHandler/endElement" />
25
<h3 class="fn"><a name="endElement" />bool QXmlContentHandler.endElement (<i>self</i>, QString, QString, QString)</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>
26
<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>
27
<p>See also <a href="qxmlcontenthandler.html#startElement">startElement</a>() and <a href="xml-sax.html#namespace-support-via-features">Namespace Support via Features</a>.</p>
28
<a name="//apple_ref/cpp/instm/QXmlContentHandler/endPrefixMapping" />
29
<h3 class="fn"><a name="endPrefixMapping" />bool QXmlContentHandler.endPrefixMapping (<i>self</i>, QString)</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>
30
<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>
31
<p>See also <a href="qxmlcontenthandler.html#startPrefixMapping">startPrefixMapping</a>() and <a href="xml-sax.html#namespace-support-via-features">Namespace Support via Features</a>.</p>
32
<a name="//apple_ref/cpp/instm/QXmlContentHandler/errorString" />
33
<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>
34
<a name="//apple_ref/cpp/instm/QXmlContentHandler/ignorableWhitespace" />
35
<h3 class="fn"><a name="ignorableWhitespace" />bool QXmlContentHandler.ignorableWhitespace (<i>self</i>, QString)</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>
36
<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>
37
<a name="//apple_ref/cpp/instm/QXmlContentHandler/processingInstruction" />
38
<h3 class="fn"><a name="processingInstruction" />bool QXmlContentHandler.processingInstruction (<i>self</i>, QString, QString)</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>
39
<p><i>target</i> is the target name of the processing instruction and <i>data</i> is the data in the processing instruction.</p>
40
<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>
41
<a name="//apple_ref/cpp/instm/QXmlContentHandler/setDocumentLocator" />
42
<h3 class="fn"><a name="setDocumentLocator" />QXmlContentHandler.setDocumentLocator (<i>self</i>, <a href="qxmllocator.html">QXmlLocator</a>)</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>
43
<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>
44
<a name="//apple_ref/cpp/instm/QXmlContentHandler/skippedEntity" />
45
<h3 class="fn"><a name="skippedEntity" />bool QXmlContentHandler.skippedEntity (<i>self</i>, QString)</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>
46
<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>
47
<a name="//apple_ref/cpp/instm/QXmlContentHandler/startDocument" />
48
<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>
49
<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>
68
<h3 class="fn"><a name="endElement" />bool QXmlContentHandler.endElement (<i>self</i>, QString, QString, QString)</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
69
tag with the qualified name <i>qName</i>, the local name
70
<i>localName</i> and the namespace URI <i>namespaceURI</i>.</p>
71
<p>If this function returns false the reader stops parsing and
72
reports an error. The reader uses the function <a href="qxmlcontenthandler.html#errorString">errorString</a>() to get the
74
<p>See also <a href="qxmlcontenthandler.html#startElement">startElement</a>() and
75
<a href="xml-sax.html#namespace-support-via-features">Namespace
76
Support via Features</a>.</p>
79
<h3 class="fn"><a name="endPrefixMapping" />bool QXmlContentHandler.endPrefixMapping (<i>self</i>, QString)</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
80
mapping for the prefix <i>prefix</i>.</p>
81
<p>If this function returns false the reader stops parsing and
82
reports an error. The reader uses the function <a href="qxmlcontenthandler.html#errorString">errorString</a>() to get the
84
<p>See also <a href="qxmlcontenthandler.html#startPrefixMapping">startPrefixMapping</a>()
85
and <a href="xml-sax.html#namespace-support-via-features">Namespace
86
Support via Features</a>.</p>
89
<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
90
any of the handler functions returns false.</p>
93
<h3 class="fn"><a name="ignorableWhitespace" />bool QXmlContentHandler.ignorableWhitespace (<i>self</i>, QString)</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
94
whitespace in element content. The whitespace is reported in
96
<p>If this function returns false the reader stops parsing and
97
reports an error. The reader uses the function <a href="qxmlcontenthandler.html#errorString">errorString</a>() to get the
101
<h3 class="fn"><a name="processingInstruction" />bool QXmlContentHandler.processingInstruction (<i>self</i>, QString, QString)</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
103
<p><i>target</i> is the target name of the processing instruction
104
and <i>data</i> is the data in the processing instruction.</p>
105
<p>If this function returns false the reader stops parsing and
106
reports an error. The reader uses the function <a href="qxmlcontenthandler.html#errorString">errorString</a>() to get the
110
<h3 class="fn"><a name="setDocumentLocator" />QXmlContentHandler.setDocumentLocator (<i>self</i>, <a href="qxmllocator.html">QXmlLocator</a>)</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
111
document. The argument <i>locator</i> is a pointer to a <a href="qxmllocator.html">QXmlLocator</a> which allows the application to
112
get the parsing position within the document.</p>
113
<p>Do not destroy the <i>locator</i>; it is destroyed when the
114
reader is destroyed. (Do not use the <i>locator</i> after the
115
reader is destroyed).</p>
118
<h3 class="fn"><a name="skippedEntity" />bool QXmlContentHandler.skippedEntity (<i>self</i>, QString)</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
119
declarations (e.g. because they are in an external DTD). If they do
120
so they report that they skipped the entity called <i>name</i> by
121
calling this function.</p>
122
<p>If this function returns false the reader stops parsing and
123
reports an error. The reader uses the function <a href="qxmlcontenthandler.html#errorString">errorString</a>() to get the
127
<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
128
document. The reader calls this function just once, after the call
129
to <a href="qxmlcontenthandler.html#setDocumentLocator">setDocumentLocator</a>(),
130
and before any other functions in this class or in the <a href="qxmldtdhandler.html">QXmlDTDHandler</a> class are called.</p>
131
<p>If this function returns false the reader stops parsing and
132
reports an error. The reader uses the function <a href="qxmlcontenthandler.html#errorString">errorString</a>() to get the
50
134
<p>See also <a href="qxmlcontenthandler.html#endDocument">endDocument</a>().</p>
51
<a name="//apple_ref/cpp/instm/QXmlContentHandler/startElement" />
52
<h3 class="fn"><a name="startElement" />bool QXmlContentHandler.startElement (<i>self</i>, QString, QString, QString, <a href="qxmlattributes.html">QXmlAttributes</a>)</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>
53
<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><x/></tt>) cause a startElement() call to be immediately followed by an <a href="qxmlcontenthandler.html#endElement">endElement</a>() call.</p>
54
<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>
55
<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>
56
<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>
57
<p>See also <a href="qxmlcontenthandler.html#endElement">endElement</a>() and <a href="xml-sax.html#namespace-support-via-features">Namespace Support via Features</a>.</p>
58
<a name="//apple_ref/cpp/instm/QXmlContentHandler/startPrefixMapping" />
59
<h3 class="fn"><a name="startPrefixMapping" />bool QXmlContentHandler.startPrefixMapping (<i>self</i>, QString, QString)</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>
60
<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>
61
<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>
62
<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>
63
<p>See also <a href="qxmlcontenthandler.html#endPrefixMapping">endPrefixMapping</a>() and <a href="xml-sax.html#namespace-support-via-features">Namespace Support via Features</a>.</p>
64
<p /><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.7.7 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> 2010</td><td align="right" width="25%">Qt 4.6.3</td></tr></table></div></address></body></html>
b'\\ No newline at end of file'
137
<h3 class="fn"><a name="startElement" />bool QXmlContentHandler.startElement (<i>self</i>, QString, QString, QString, <a href="qxmlattributes.html">QXmlAttributes</a>)</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
139
<p>There is a corresponding <a href="qxmlcontenthandler.html#endElement">endElement</a>() call when the
140
corresponding end element tag is read. The startElement() and
141
<a href="qxmlcontenthandler.html#endElement">endElement</a>() calls
142
are always nested correctly. Empty element tags (e.g.
143
<tt><x/></tt>) cause a startElement() call to be immediately
144
followed by an <a href="qxmlcontenthandler.html#endElement">endElement</a>() call.</p>
145
<p>The attribute list provided only contains attributes with
146
explicit values. The attribute list contains attributes used for
147
namespace declaration (i.e. attributes starting with xmlns) only if
148
the namespace-prefix property of the reader is true.</p>
149
<p>The argument <i>namespaceURI</i> is the namespace URI, or an
150
empty string if the element has no namespace URI or if no namespace
151
processing is done. <i>localName</i> is the local name (without
152
prefix), or an empty string if no namespace processing is done,
153
<i>qName</i> is the qualified name (with prefix) and <i>atts</i>
154
are the attributes attached to the element. If there are no
155
attributes, <i>atts</i> is an empty attributes object.</p>
156
<p>If this function returns false the reader stops parsing and
157
reports an error. The reader uses the function <a href="qxmlcontenthandler.html#errorString">errorString</a>() to get the
159
<p>See also <a href="qxmlcontenthandler.html#endElement">endElement</a>() and <a href="xml-sax.html#namespace-support-via-features">Namespace Support via
163
<h3 class="fn"><a name="startPrefixMapping" />bool QXmlContentHandler.startPrefixMapping (<i>self</i>, QString, QString)</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
164
prefix-URI namespace mapping scope. This information is not
165
necessary for normal namespace processing since the reader
166
automatically replaces prefixes for element and attribute
168
<p>Note that startPrefixMapping() and <a href="qxmlcontenthandler.html#endPrefixMapping">endPrefixMapping</a>()
169
calls are not guaranteed to be properly nested relative to each
170
other: all startPrefixMapping() events occur before the
171
corresponding <a href="qxmlcontenthandler.html#startElement">startElement</a>() event,
172
and all <a href="qxmlcontenthandler.html#endPrefixMapping">endPrefixMapping</a>()
173
events occur after the corresponding <a href="qxmlcontenthandler.html#endElement">endElement</a>() event, but
174
their order is not otherwise guaranteed.</p>
175
<p>The argument <i>prefix</i> is the namespace prefix being
176
declared and the argument <i>uri</i> is the namespace URI the
177
prefix is mapped to.</p>
178
<p>If this function returns false the reader stops parsing and
179
reports an error. The reader uses the function <a href="qxmlcontenthandler.html#errorString">errorString</a>() to get the
181
<p>See also <a href="qxmlcontenthandler.html#endPrefixMapping">endPrefixMapping</a>()
182
and <a href="xml-sax.html#namespace-support-via-features">Namespace
183
Support via Features</a>.</p>
184
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.8.1 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> 2010</td><td align="right" width="25%">Qt 4.7.0</td></tr></table></div></address></body></html>
b'\\ No newline at end of file'