Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-updates > by-pkgid > e1011ddec34cda34f3a002b121247943 > files > 799

python-docs-2.7.17-1.1.mga7.noarch.rpm


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>19.3. htmllib — A parser for HTML documents &#8212; Python 2.7.17 documentation</title>
    <link rel="stylesheet" href="../_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    
    <script type="text/javascript" src="../_static/sidebar.js"></script>
    
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within Python 2.7.17 documentation"
          href="../_static/opensearch.xml"/>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="copyright" title="Copyright" href="../copyright.html" />
    <link rel="next" title="19.5. XML Processing Modules" href="xml.html" />
    <link rel="prev" title="19.2. sgmllib — Simple SGML parser" href="sgmllib.html" />
    <link rel="shortcut icon" type="image/png" href="../_static/py.png" />
    <link rel="canonical" href="https://docs.python.org/2/library/htmllib.html" />
    <script type="text/javascript" src="../_static/copybutton.js"></script>
    
 
    

  </head><body>  
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="xml.html" title="19.5. XML Processing Modules"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="sgmllib.html" title="19.2. sgmllib — Simple SGML parser"
             accesskey="P">previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="https://www.python.org/">Python</a> &#187;</li>
        <li>
          <a href="../index.html">Python 2.7.17 documentation</a> &#187;
        </li>

          <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="markup.html" accesskey="U">19. Structured Markup Processing Tools</a> &#187;</li> 
      </ul>
    </div>    

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="module-htmllib">
<span id="htmllib-a-parser-for-html-documents"></span><h1>19.3. <a class="reference internal" href="#module-htmllib" title="htmllib: A parser for HTML documents. (deprecated)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">htmllib</span></code></a> — A parser for HTML documents<a class="headerlink" href="#module-htmllib" title="Permalink to this headline">¶</a></h1>
<div class="deprecated">
<p><span class="versionmodified deprecated">Deprecated since version 2.6: </span>The <a class="reference internal" href="#module-htmllib" title="htmllib: A parser for HTML documents. (deprecated)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">htmllib</span></code></a> module has been removed in Python 3.
Use <a class="reference internal" href="htmlparser.html#module-HTMLParser" title="HTMLParser: A simple parser that can handle HTML and XHTML."><code class="xref py py-mod docutils literal notranslate"><span class="pre">HTMLParser</span></code></a> instead in Python 2, and the equivalent,
<code class="xref py py-mod docutils literal notranslate"><span class="pre">html.parser</span></code>, in Python 3.</p>
</div>
<span class="target" id="index-0"></span><p id="index-1">This module defines a class which can serve as a base for parsing text files
formatted in the HyperText Mark-up Language (HTML).  The class is not directly
concerned with I/O — it must be provided with input in string form via a
method, and makes calls to methods of a “formatter” object in order to produce
output.  The <a class="reference internal" href="htmlparser.html#HTMLParser.HTMLParser" title="HTMLParser.HTMLParser"><code class="xref py py-class docutils literal notranslate"><span class="pre">HTMLParser</span></code></a> class is designed to be used as a base class
for other classes in order to add functionality, and allows most of its methods
to be extended or overridden.  In turn, this class is derived from and extends
the <code class="xref py py-class docutils literal notranslate"><span class="pre">SGMLParser</span></code> class defined in module <a class="reference internal" href="sgmllib.html#module-sgmllib" title="sgmllib: Only as much of an SGML parser as needed to parse HTML. (deprecated)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sgmllib</span></code></a>.  The
<a class="reference internal" href="htmlparser.html#HTMLParser.HTMLParser" title="HTMLParser.HTMLParser"><code class="xref py py-class docutils literal notranslate"><span class="pre">HTMLParser</span></code></a> implementation supports the HTML 2.0 language as described
in <span class="target" id="index-2"></span><a class="rfc reference external" href="https://tools.ietf.org/html/rfc1866.html"><strong>RFC 1866</strong></a>.  Two implementations of formatter objects are provided in the
<a class="reference internal" href="formatter.html#module-formatter" title="formatter: Generic output formatter and device interface."><code class="xref py py-mod docutils literal notranslate"><span class="pre">formatter</span></code></a> module; refer to the documentation for that module for
information on the formatter interface.</p>
<p>The following is a summary of the interface defined by
<a class="reference internal" href="sgmllib.html#sgmllib.SGMLParser" title="sgmllib.SGMLParser"><code class="xref py py-class docutils literal notranslate"><span class="pre">sgmllib.SGMLParser</span></code></a>:</p>
<ul>
<li><p>The interface to feed data to an instance is through the <code class="xref py py-meth docutils literal notranslate"><span class="pre">feed()</span></code> method,
which takes a string argument.  This can be called with as little or as much
text at a time as desired; <code class="docutils literal notranslate"><span class="pre">p.feed(a);</span> <span class="pre">p.feed(b)</span></code> has the same effect as
<code class="docutils literal notranslate"><span class="pre">p.feed(a+b)</span></code>.  When the data contains complete HTML markup constructs, these
are processed immediately; incomplete constructs are saved in a buffer.  To
force processing of all unprocessed data, call the <code class="xref py py-meth docutils literal notranslate"><span class="pre">close()</span></code> method.</p>
<p>For example, to parse the entire contents of a file, use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">parser</span><span class="o">.</span><span class="n">feed</span><span class="p">(</span><span class="nb">open</span><span class="p">(</span><span class="s1">&#39;myfile.html&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">read</span><span class="p">())</span>
<span class="n">parser</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
</pre></div>
</div>
</li>
<li><p>The interface to define semantics for HTML tags is very simple: derive a class
and define methods called <code class="xref py py-meth docutils literal notranslate"><span class="pre">start_tag()</span></code>, <code class="xref py py-meth docutils literal notranslate"><span class="pre">end_tag()</span></code>, or <code class="xref py py-meth docutils literal notranslate"><span class="pre">do_tag()</span></code>.
The parser will call these at appropriate moments: <code class="xref py py-meth docutils literal notranslate"><span class="pre">start_tag()</span></code> or
<code class="xref py py-meth docutils literal notranslate"><span class="pre">do_tag()</span></code> is called when an opening tag of the form <code class="docutils literal notranslate"><span class="pre">&lt;tag</span> <span class="pre">...&gt;</span></code> is
encountered; <code class="xref py py-meth docutils literal notranslate"><span class="pre">end_tag()</span></code> is called when a closing tag of the form <code class="docutils literal notranslate"><span class="pre">&lt;tag&gt;</span></code>
is encountered.  If an opening tag requires a corresponding closing tag, like
<code class="docutils literal notranslate"><span class="pre">&lt;H1&gt;</span></code> … <code class="docutils literal notranslate"><span class="pre">&lt;/H1&gt;</span></code>, the class should define the <code class="xref py py-meth docutils literal notranslate"><span class="pre">start_tag()</span></code> method; if
a tag requires no closing tag, like <code class="docutils literal notranslate"><span class="pre">&lt;P&gt;</span></code>, the class should define the
<code class="xref py py-meth docutils literal notranslate"><span class="pre">do_tag()</span></code> method.</p></li>
</ul>
<p>The module defines a parser class and an exception:</p>
<dl class="class">
<dt id="htmllib.HTMLParser">
<em class="property">class </em><code class="descclassname">htmllib.</code><code class="descname">HTMLParser</code><span class="sig-paren">(</span><em>formatter</em><span class="sig-paren">)</span><a class="headerlink" href="#htmllib.HTMLParser" title="Permalink to this definition">¶</a></dt>
<dd><p>This is the basic HTML parser class.  It supports all entity names required by
the XHTML 1.0 Recommendation (<a class="reference external" href="https://www.w3.org/TR/xhtml1">https://www.w3.org/TR/xhtml1</a>).   It also defines
handlers for all HTML 2.0 and many HTML 3.0 and 3.2 elements.</p>
</dd></dl>

<dl class="exception">
<dt id="htmllib.HTMLParseError">
<em class="property">exception </em><code class="descclassname">htmllib.</code><code class="descname">HTMLParseError</code><a class="headerlink" href="#htmllib.HTMLParseError" title="Permalink to this definition">¶</a></dt>
<dd><p>Exception raised by the <a class="reference internal" href="htmlparser.html#HTMLParser.HTMLParser" title="HTMLParser.HTMLParser"><code class="xref py py-class docutils literal notranslate"><span class="pre">HTMLParser</span></code></a> class when it encounters an error
while parsing.</p>
<div class="versionadded">
<p><span class="versionmodified added">New in version 2.4.</span></p>
</div>
</dd></dl>

<div class="admonition seealso">
<p class="admonition-title">See also</p>
<dl class="simple">
<dt>Module <a class="reference internal" href="formatter.html#module-formatter" title="formatter: Generic output formatter and device interface."><code class="xref py py-mod docutils literal notranslate"><span class="pre">formatter</span></code></a></dt><dd><p>Interface definition for transforming an abstract flow of formatting events into
specific output events on writer objects.</p>
</dd>
<dt>Module <a class="reference internal" href="htmlparser.html#module-HTMLParser" title="HTMLParser: A simple parser that can handle HTML and XHTML."><code class="xref py py-mod docutils literal notranslate"><span class="pre">HTMLParser</span></code></a></dt><dd><p>Alternate HTML parser that offers a slightly lower-level view of the input, but
is designed to work with XHTML, and does not implement some of the SGML syntax
not used in “HTML as deployed” and which isn’t legal for XHTML.</p>
</dd>
<dt>Module <a class="reference internal" href="#module-htmlentitydefs" title="htmlentitydefs: Definitions of HTML general entities."><code class="xref py py-mod docutils literal notranslate"><span class="pre">htmlentitydefs</span></code></a></dt><dd><p>Definition of replacement text for XHTML 1.0  entities.</p>
</dd>
<dt>Module <a class="reference internal" href="sgmllib.html#module-sgmllib" title="sgmllib: Only as much of an SGML parser as needed to parse HTML. (deprecated)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sgmllib</span></code></a></dt><dd><p>Base class for <a class="reference internal" href="htmlparser.html#HTMLParser.HTMLParser" title="HTMLParser.HTMLParser"><code class="xref py py-class docutils literal notranslate"><span class="pre">HTMLParser</span></code></a>.</p>
</dd>
</dl>
</div>
<div class="section" id="htmlparser-objects">
<span id="html-parser-objects"></span><h2>19.3.1. HTMLParser Objects<a class="headerlink" href="#htmlparser-objects" title="Permalink to this headline">¶</a></h2>
<p>In addition to tag methods, the <a class="reference internal" href="htmlparser.html#HTMLParser.HTMLParser" title="HTMLParser.HTMLParser"><code class="xref py py-class docutils literal notranslate"><span class="pre">HTMLParser</span></code></a> class provides some
additional methods and instance variables for use within tag methods.</p>
<dl class="attribute">
<dt id="htmllib.HTMLParser.formatter">
<code class="descclassname">HTMLParser.</code><code class="descname">formatter</code><a class="headerlink" href="#htmllib.HTMLParser.formatter" title="Permalink to this definition">¶</a></dt>
<dd><p>This is the formatter instance associated with the parser.</p>
</dd></dl>

<dl class="attribute">
<dt id="htmllib.HTMLParser.nofill">
<code class="descclassname">HTMLParser.</code><code class="descname">nofill</code><a class="headerlink" href="#htmllib.HTMLParser.nofill" title="Permalink to this definition">¶</a></dt>
<dd><p>Boolean flag which should be true when whitespace should not be collapsed, or
false when it should be.  In general, this should only be true when character
data is to be treated as “preformatted” text, as within a <code class="docutils literal notranslate"><span class="pre">&lt;PRE&gt;</span></code> element.
The default value is false.  This affects the operation of <code class="xref py py-meth docutils literal notranslate"><span class="pre">handle_data()</span></code>
and <a class="reference internal" href="#htmllib.HTMLParser.save_end" title="htmllib.HTMLParser.save_end"><code class="xref py py-meth docutils literal notranslate"><span class="pre">save_end()</span></code></a>.</p>
</dd></dl>

<dl class="method">
<dt id="htmllib.HTMLParser.anchor_bgn">
<code class="descclassname">HTMLParser.</code><code class="descname">anchor_bgn</code><span class="sig-paren">(</span><em>href</em>, <em>name</em>, <em>type</em><span class="sig-paren">)</span><a class="headerlink" href="#htmllib.HTMLParser.anchor_bgn" title="Permalink to this definition">¶</a></dt>
<dd><p>This method is called at the start of an anchor region.  The arguments
correspond to the attributes of the <code class="docutils literal notranslate"><span class="pre">&lt;A&gt;</span></code> tag with the same names.  The
default implementation maintains a list of hyperlinks (defined by the <code class="docutils literal notranslate"><span class="pre">HREF</span></code>
attribute for <code class="docutils literal notranslate"><span class="pre">&lt;A&gt;</span></code> tags) within the document.  The list of hyperlinks is
available as the data attribute <code class="xref py py-attr docutils literal notranslate"><span class="pre">anchorlist</span></code>.</p>
</dd></dl>

<dl class="method">
<dt id="htmllib.HTMLParser.anchor_end">
<code class="descclassname">HTMLParser.</code><code class="descname">anchor_end</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#htmllib.HTMLParser.anchor_end" title="Permalink to this definition">¶</a></dt>
<dd><p>This method is called at the end of an anchor region.  The default
implementation adds a textual footnote marker using an index into the list of
hyperlinks created by <a class="reference internal" href="#htmllib.HTMLParser.anchor_bgn" title="htmllib.HTMLParser.anchor_bgn"><code class="xref py py-meth docutils literal notranslate"><span class="pre">anchor_bgn()</span></code></a>.</p>
</dd></dl>

<dl class="method">
<dt id="htmllib.HTMLParser.handle_image">
<code class="descclassname">HTMLParser.</code><code class="descname">handle_image</code><span class="sig-paren">(</span><em>source</em>, <em>alt</em><span class="optional">[</span>, <em>ismap</em><span class="optional">[</span>, <em>align</em><span class="optional">[</span>, <em>width</em><span class="optional">[</span>, <em>height</em><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#htmllib.HTMLParser.handle_image" title="Permalink to this definition">¶</a></dt>
<dd><p>This method is called to handle images.  The default implementation simply
passes the <em>alt</em> value to the <code class="xref py py-meth docutils literal notranslate"><span class="pre">handle_data()</span></code> method.</p>
</dd></dl>

<dl class="method">
<dt id="htmllib.HTMLParser.save_bgn">
<code class="descclassname">HTMLParser.</code><code class="descname">save_bgn</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#htmllib.HTMLParser.save_bgn" title="Permalink to this definition">¶</a></dt>
<dd><p>Begins saving character data in a buffer instead of sending it to the formatter
object.  Retrieve the stored data via <a class="reference internal" href="#htmllib.HTMLParser.save_end" title="htmllib.HTMLParser.save_end"><code class="xref py py-meth docutils literal notranslate"><span class="pre">save_end()</span></code></a>. Use of the
<a class="reference internal" href="#htmllib.HTMLParser.save_bgn" title="htmllib.HTMLParser.save_bgn"><code class="xref py py-meth docutils literal notranslate"><span class="pre">save_bgn()</span></code></a> / <a class="reference internal" href="#htmllib.HTMLParser.save_end" title="htmllib.HTMLParser.save_end"><code class="xref py py-meth docutils literal notranslate"><span class="pre">save_end()</span></code></a> pair may not be nested.</p>
</dd></dl>

<dl class="method">
<dt id="htmllib.HTMLParser.save_end">
<code class="descclassname">HTMLParser.</code><code class="descname">save_end</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#htmllib.HTMLParser.save_end" title="Permalink to this definition">¶</a></dt>
<dd><p>Ends buffering character data and returns all data saved since the preceding
call to <a class="reference internal" href="#htmllib.HTMLParser.save_bgn" title="htmllib.HTMLParser.save_bgn"><code class="xref py py-meth docutils literal notranslate"><span class="pre">save_bgn()</span></code></a>.  If the <a class="reference internal" href="#htmllib.HTMLParser.nofill" title="htmllib.HTMLParser.nofill"><code class="xref py py-attr docutils literal notranslate"><span class="pre">nofill</span></code></a> flag is false, whitespace is
collapsed to single spaces.  A call to this method without a preceding call to
<a class="reference internal" href="#htmllib.HTMLParser.save_bgn" title="htmllib.HTMLParser.save_bgn"><code class="xref py py-meth docutils literal notranslate"><span class="pre">save_bgn()</span></code></a> will raise a <a class="reference internal" href="exceptions.html#exceptions.TypeError" title="exceptions.TypeError"><code class="xref py py-exc docutils literal notranslate"><span class="pre">TypeError</span></code></a> exception.</p>
</dd></dl>

</div>
</div>
<div class="section" id="module-htmlentitydefs">
<span id="htmlentitydefs-definitions-of-html-general-entities"></span><h1>19.4. <a class="reference internal" href="#module-htmlentitydefs" title="htmlentitydefs: Definitions of HTML general entities."><code class="xref py py-mod docutils literal notranslate"><span class="pre">htmlentitydefs</span></code></a> — Definitions of HTML general entities<a class="headerlink" href="#module-htmlentitydefs" title="Permalink to this headline">¶</a></h1>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The <a class="reference internal" href="#module-htmlentitydefs" title="htmlentitydefs: Definitions of HTML general entities."><code class="xref py py-mod docutils literal notranslate"><span class="pre">htmlentitydefs</span></code></a> module has been renamed to <code class="xref py py-mod docutils literal notranslate"><span class="pre">html.entities</span></code> in
Python 3.  The <a class="reference internal" href="../glossary.html#term-2to3"><span class="xref std std-term">2to3</span></a> tool will automatically adapt imports when
converting your sources to Python 3.</p>
</div>
<p><strong>Source code:</strong> <a class="reference external" href="https://github.com/python/cpython/tree/2.7/Lib/htmlentitydefs.py">Lib/htmlentitydefs.py</a></p>
<hr class="docutils" />
<p>This module defines three dictionaries, <code class="docutils literal notranslate"><span class="pre">name2codepoint</span></code>, <code class="docutils literal notranslate"><span class="pre">codepoint2name</span></code>,
and <code class="docutils literal notranslate"><span class="pre">entitydefs</span></code>. <code class="docutils literal notranslate"><span class="pre">entitydefs</span></code> is used by the <a class="reference internal" href="#module-htmllib" title="htmllib: A parser for HTML documents. (deprecated)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">htmllib</span></code></a> module to
provide the <a class="reference internal" href="#htmlentitydefs.entitydefs" title="htmlentitydefs.entitydefs"><code class="xref py py-attr docutils literal notranslate"><span class="pre">entitydefs</span></code></a> attribute of the <a class="reference internal" href="htmlparser.html#HTMLParser.HTMLParser" title="HTMLParser.HTMLParser"><code class="xref py py-class docutils literal notranslate"><span class="pre">HTMLParser</span></code></a> class.  The
definition provided here contains all the entities defined by XHTML 1.0  that
can be handled using simple textual substitution in the Latin-1 character set
(ISO-8859-1).</p>
<dl class="data">
<dt id="htmlentitydefs.entitydefs">
<code class="descclassname">htmlentitydefs.</code><code class="descname">entitydefs</code><a class="headerlink" href="#htmlentitydefs.entitydefs" title="Permalink to this definition">¶</a></dt>
<dd><p>A dictionary mapping XHTML 1.0 entity definitions to their replacement text in
ISO Latin-1.</p>
</dd></dl>

<dl class="data">
<dt id="htmlentitydefs.name2codepoint">
<code class="descclassname">htmlentitydefs.</code><code class="descname">name2codepoint</code><a class="headerlink" href="#htmlentitydefs.name2codepoint" title="Permalink to this definition">¶</a></dt>
<dd><p>A dictionary that maps HTML entity names to the Unicode code points.</p>
<div class="versionadded">
<p><span class="versionmodified added">New in version 2.3.</span></p>
</div>
</dd></dl>

<dl class="data">
<dt id="htmlentitydefs.codepoint2name">
<code class="descclassname">htmlentitydefs.</code><code class="descname">codepoint2name</code><a class="headerlink" href="#htmlentitydefs.codepoint2name" title="Permalink to this definition">¶</a></dt>
<dd><p>A dictionary that maps Unicode code points to HTML entity names.</p>
<div class="versionadded">
<p><span class="versionmodified added">New in version 2.3.</span></p>
</div>
</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../contents.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">19.3. <code class="xref py py-mod docutils literal notranslate"><span class="pre">htmllib</span></code> — A parser for HTML documents</a><ul>
<li><a class="reference internal" href="#htmlparser-objects">19.3.1. HTMLParser Objects</a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-htmlentitydefs">19.4. <code class="xref py py-mod docutils literal notranslate"><span class="pre">htmlentitydefs</span></code> — Definitions of HTML general entities</a></li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="sgmllib.html"
                        title="previous chapter">19.2. <code class="xref py py-mod docutils literal notranslate"><span class="pre">sgmllib</span></code> — Simple SGML parser</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="xml.html"
                        title="next chapter">19.5. XML Processing Modules</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/library/htmllib.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>  
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="xml.html" title="19.5. XML Processing Modules"
             >next</a> |</li>
        <li class="right" >
          <a href="sgmllib.html" title="19.2. sgmllib — Simple SGML parser"
             >previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="https://www.python.org/">Python</a> &#187;</li>
        <li>
          <a href="../index.html">Python 2.7.17 documentation</a> &#187;
        </li>

          <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="markup.html" >19. Structured Markup Processing Tools</a> &#187;</li> 
      </ul>
    </div>  
    <div class="footer">
    &copy; <a href="../copyright.html">Copyright</a> 1990-2019, Python Software Foundation.
    <br />
    The Python Software Foundation is a non-profit corporation.
    <a href="https://www.python.org/psf/donations/">Please donate.</a>
    <br />
    Last updated on Oct 19, 2019.
    <a href="../bugs.html">Found a bug</a>?
    <br />
    Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 2.0.1.
    </div>

  </body>
</html>