topical media & game development
basic-xml-13--xmlplus.sax.handler.ContentHandler-class.htm / htm
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>_xmlplus.sax.handler.ContentHandler</title>
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
<tr valign="center">
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<font size="-1"><b class="breadcrumbs">
Package _xmlplus ::
Package sax ::
Module handler ::
Class ContentHandler
</b></font></br>
</td>
<td><table cellpadding="0" cellspacing="0">
<tr><td align="right"><font size="-2">[<b>show private</b> | hide private]</font></td></tr>
<tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="..\private_xmlplus.sax.handler.ContentHandler-class.html" target="_top">no frames</a>]</font></td></tr>
</table></td>
</tr></table>
<!-- =========== START OF CLASS DESCRIPTION =========== -->
<h2 class="class">Class ContentHandler</h2>
<dl><dt><b>Known Subclasses:</b></dt>
<dd>
<a href="feed_handler.FeedHandler-class.html"><code>FeedHandler</code></a></dd></dl>
<hr/>
<p>Interface for receiving logical document content events.</p>
This is the main callback interface in SAX, and the one most important
to applications. The order of events in this interface mirrors the order
of the information in the document.
<hr/>
<!-- =========== START OF METHOD SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
<th colspan="2">Method Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><a name="__init__"></a><span class="summary-sig"><span class="summary-sig-name">__init__</span>(<span class=summary-sig-arg>self</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="..\private_xmlplus.sax.handler.ContentHandler-class.html#characters" class="summary-sig-name"><code>characters</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>content</span>)</span></code>
<br />
Receive notification of character data.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="..\private_xmlplus.sax.handler.ContentHandler-class.html#endDocument" class="summary-sig-name"><code>endDocument</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
Receive notification of the end of a document.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="..\private_xmlplus.sax.handler.ContentHandler-class.html#endElement" class="summary-sig-name"><code>endElement</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>name</span>)</span></code>
<br />
Signals the end of an element in non-namespace mode.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="..\private_xmlplus.sax.handler.ContentHandler-class.html#endElementNS" class="summary-sig-name"><code>endElementNS</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>name</span>,
<span class=summary-sig-arg>qname</span>)</span></code>
<br />
Signals the end of an element in namespace mode.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="..\private_xmlplus.sax.handler.ContentHandler-class.html#endPrefixMapping" class="summary-sig-name"><code>endPrefixMapping</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>prefix</span>)</span></code>
<br />
End the scope of a prefix-URI mapping.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="..\private_xmlplus.sax.handler.ContentHandler-class.html#ignorableWhitespace" class="summary-sig-name"><code>ignorableWhitespace</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>whitespace</span>)</span></code>
<br />
Receive notification of ignorable whitespace in element content.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="..\private_xmlplus.sax.handler.ContentHandler-class.html#processingInstruction" class="summary-sig-name"><code>processingInstruction</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>target</span>,
<span class=summary-sig-arg>data</span>)</span></code>
<br />
Receive notification of a processing instruction.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="..\private_xmlplus.sax.handler.ContentHandler-class.html#setDocumentLocator" class="summary-sig-name"><code>setDocumentLocator</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>locator</span>)</span></code>
<br />
Called by the parser to give the application a locator for locating
the origin of document events.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="..\private_xmlplus.sax.handler.ContentHandler-class.html#skippedEntity" class="summary-sig-name"><code>skippedEntity</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>name</span>)</span></code>
<br />
Receive notification of a skipped entity.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="..\private_xmlplus.sax.handler.ContentHandler-class.html#startDocument" class="summary-sig-name"><code>startDocument</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
Receive notification of the beginning of a document.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="..\private_xmlplus.sax.handler.ContentHandler-class.html#startElement" class="summary-sig-name"><code>startElement</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>name</span>,
<span class=summary-sig-arg>attrs</span>)</span></code>
<br />
Signals the start of an element in non-namespace mode.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="..\private_xmlplus.sax.handler.ContentHandler-class.html#startElementNS" class="summary-sig-name"><code>startElementNS</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>name</span>,
<span class=summary-sig-arg>qname</span>,
<span class=summary-sig-arg>attrs</span>)</span></code>
<br />
Signals the start of an element in namespace mode.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="..\private_xmlplus.sax.handler.ContentHandler-class.html#startPrefixMapping" class="summary-sig-name"><code>startPrefixMapping</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>prefix</span>,
<span class=summary-sig-arg>uri</span>)</span></code>
<br />
Begin the scope of a prefix-URI Namespace mapping.</td></tr>
</table><br />
<!-- =========== START OF METHOD DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
<th colspan="2">Method Details</th></tr>
</table>
<a name="characters"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">characters</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>content</span>)</span>
</h3>
<p>Receive notification of character data.</p>
The Parser will call this method to report each chunk of character
data. SAX parsers may return all contiguous character data in a single
chunk, or they may split it into several chunks; however, all of the
characters in any single event must come from the same external entity
so that the Locator provides useful information.
<dl><dt></dt><dd>
</dd></dl>
</td></tr></table>
<a name="endDocument"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">endDocument</span>(<span class=sig-arg>self</span>)</span>
</h3>
<p>Receive notification of the end of a document.</p>
The SAX parser will invoke this method only once, and it will be the
last method invoked during the parse. The parser shall not invoke this
method until it has either abandoned parsing (because of an
unrecoverable error) or reached the end of input.
<dl><dt></dt><dd>
</dd></dl>
</td></tr></table>
<a name="endElement"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">endElement</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>name</span>)</span>
</h3>
<p>Signals the end of an element in non-namespace mode.</p>
The name parameter contains the name of the element type, just as
with the startElement event.
<dl><dt></dt><dd>
</dd></dl>
</td></tr></table>
<a name="endElementNS"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">endElementNS</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>name</span>,
<span class=sig-arg>qname</span>)</span>
</h3>
<p>Signals the end of an element in namespace mode.</p>
The name parameter contains the name of the element type, just as
with the startElementNS event.
<dl><dt></dt><dd>
</dd></dl>
</td></tr></table>
<a name="endPrefixMapping"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">endPrefixMapping</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>prefix</span>)</span>
</h3>
<p>End the scope of a prefix-URI mapping.</p>
See startPrefixMapping for details. This event will always occur
after the corresponding endElement event, but the order of
endPrefixMapping events is not otherwise guaranteed.
<dl><dt></dt><dd>
</dd></dl>
</td></tr></table>
<a name="ignorableWhitespace"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">ignorableWhitespace</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>whitespace</span>)</span>
</h3>
<p>Receive notification of ignorable whitespace in element content.</p>
<p>Validating Parsers must use this method to report each chunk of
ignorable whitespace (see the W3C XML 1.0 recommendation, section
2.10): non-validating parsers may also use this method if they are
capable of parsing and using content models.</p>
<p>SAX parsers may return all contiguous whitespace in a single chunk,
or they may split it into several chunks; however, all of the
characters in any single event must come from the same external entity,
so that the Locator provides useful information.</p>
The application must not attempt to read from the array outside of
the specified range.
<dl><dt></dt><dd>
</dd></dl>
</td></tr></table>
<a name="processingInstruction"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">processingInstruction</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>target</span>,
<span class=sig-arg>data</span>)</span>
</h3>
<p>Receive notification of a processing instruction.</p>
<p>The Parser will invoke this method once for each processing
instruction found: note that processing instructions may occur before
or after the main document element.</p>
A SAX parser should never report an XML declaration (XML 1.0,
section 2.8) or a text declaration (XML 1.0, section 4.3.1) using this
method.
<dl><dt></dt><dd>
</dd></dl>
</td></tr></table>
<a name="setDocumentLocator"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">setDocumentLocator</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>locator</span>)</span>
</h3>
<p>Called by the parser to give the application a locator for locating
the origin of document events.</p>
<p>SAX parsers are strongly encouraged (though not absolutely required)
to supply a locator: if it does so, it must supply the locator to the
application by invoking this method before invoking any of the other
methods in the DocumentHandler interface.</p>
<p>The locator allows the application to determine the end position of
any document-related event, even if the parser is not reporting an
error. Typically, the application will use this information for
reporting its own errors (such as character content that does not match
an application's business rules). The information returned by the
locator is probably not sufficient for use with a search engine.</p>
Note that the locator will return correct information only during
the invocation of the events in this interface. The application should
not attempt to use it at any other time.
<dl><dt></dt><dd>
</dd></dl>
</td></tr></table>
<a name="skippedEntity"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">skippedEntity</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>name</span>)</span>
</h3>
<p>Receive notification of a skipped entity.</p>
The Parser will invoke this method once for each entity skipped.
Non-validating processors may skip entities if they have not seen the
declarations (because, for example, the entity was declared in an
external DTD subset). All processors may skip external entities,
depending on the values of the
http://xml.org/sax/features/external-general-entities and the
http://xml.org/sax/features/external-parameter-entities properties.
<dl><dt></dt><dd>
</dd></dl>
</td></tr></table>
<a name="startDocument"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">startDocument</span>(<span class=sig-arg>self</span>)</span>
</h3>
<p>Receive notification of the beginning of a document.</p>
The SAX parser will invoke this method only once, before any other
methods in this interface or in DTDHandler (except for
setDocumentLocator).
<dl><dt></dt><dd>
</dd></dl>
</td></tr></table>
<a name="startElement"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">startElement</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>name</span>,
<span class=sig-arg>attrs</span>)</span>
</h3>
<p>Signals the start of an element in non-namespace mode.</p>
The name parameter contains the raw XML 1.0 name of the element type
as a string and the attrs parameter holds an instance of the Attributes
class containing the attributes of the element.
<dl><dt></dt><dd>
</dd></dl>
</td></tr></table>
<a name="startElementNS"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">startElementNS</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>name</span>,
<span class=sig-arg>qname</span>,
<span class=sig-arg>attrs</span>)</span>
</h3>
<p>Signals the start of an element in namespace mode.</p>
<p>The name parameter contains the name of the element type as a (uri,
localname) tuple, the qname parameter the raw XML 1.0 name used in the
source document, and the attrs parameter holds an instance of the
Attributes class containing the attributes of the element.</p>
The uri part of the name tuple is None for elements which have no
namespace.
<dl><dt></dt><dd>
</dd></dl>
</td></tr></table>
<a name="startPrefixMapping"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">startPrefixMapping</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>prefix</span>,
<span class=sig-arg>uri</span>)</span>
</h3>
<p>Begin the scope of a prefix-URI Namespace mapping.</p>
<p>The information from this event is not necessary for normal
Namespace processing: the SAX XML reader will automatically replace
prefixes for element and attribute names when the
http://xml.org/sax/features/namespaces feature is true (the
default).</p>
<p>There are cases, however, when applications need to use prefixes in
character data or in attribute values, where they cannot safely be
expanded automatically; the start/endPrefixMapping event supplies the
information to the application to expand prefixes in those contexts
itself, if necessary.</p>
Note that start/endPrefixMapping events are not guaranteed to be
properly nested relative to each-other: all startPrefixMapping events
will occur before the corresponding startElement event, and all
endPrefixMapping events will occur after the corresponding endElement
event, but their order is not guaranteed.
<dl><dt></dt><dd>
</dd></dl>
</td></tr></table>
<br />
<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
<tr valign="center">
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left"><font size="-2">Generated by Epydoc 2.1 on Thu May 27 10:33:26 2004</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net></a></td>
</tr>
</table>
</body>
</html>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.