Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 7e03e96dde1cbbdbc7cc96424cd9e059 > files > 324

python-feedparser-doc-5.1.3-3.fc18.noarch.rpm



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>entries[i].content &mdash; feedparser 5.1.3 documentation</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="_static/feedparser.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '5.1.3',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </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>
    <link rel="top" title="feedparser 5.1.3 documentation" href="index.html" />
    <link rel="up" title="Reference" href="reference.html" />
    <link rel="next" title="entries[i].contributors" href="reference-entry-contributors.html" />
    <link rel="prev" title="entries[i].comments" href="reference-entry-comments.html" /> 
  </head>
  <body>
    <div class="related">
      <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="reference-entry-contributors.html" title="entries[i].contributors"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="reference-entry-comments.html" title="entries[i].comments"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">feedparser 5.1.3 documentation</a> &raquo;</li>
          <li><a href="reference.html" accesskey="U">Reference</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="entries-i-content">
<span id="reference-entry-content"></span><h1><tt class="xref py py-attr docutils literal"><span class="pre">entries[i].content</span></tt><a class="headerlink" href="#entries-i-content" title="Permalink to this headline">¶</a></h1>
<p>A list of dictionaries with details about the full content of the entry.</p>
<p>Atom feeds may contain multiple content elements.  Clients should render as
many of them as possible, based on the type and the client&#8217;s abilities.</p>
<div class="section" id="entries-i-content-j-value">
<span id="reference-entry-content-value"></span><h2><tt class="xref py py-attr docutils literal"><span class="pre">entries[i].content[j].value</span></tt><a class="headerlink" href="#entries-i-content-j-value" title="Permalink to this headline">¶</a></h2>
<p>The value of this piece of content.</p>
<p>If this contains <abbr title="HyperText Markup Language">HTML</abbr> or
<abbr title="Extensible HyperText Markup Language">XHTML</abbr>, it is
<a class="reference internal" href="html-sanitization.html#advanced-sanitization"><em>sanitized</em></a> by default.</p>
<p>If this contains <abbr title="HyperText Markup Language">HTML</abbr> or
<abbr title="Extensible HyperText Markup Language">XHTML</abbr>, certain (X)HTML elements
within this value may contain relative <abbr title="Uniform Resource Identifier">URI</abbr>s.
If so, they are <a class="reference internal" href="resolving-relative-links.html#advanced-base"><em>resolved according to a set of rules</em></a>.</p>
<p>If this contains <abbr title="HyperText Markup Language">HTML</abbr> or
<abbr title="Extensible HyperText Markup Language">XHTML</abbr>, it will be
<a class="reference internal" href="microformats.html#advanced-microformats"><em>parsed for microformats</em></a>.</p>
</div>
<div class="section" id="entries-i-content-j-type">
<span id="reference-entry-content-type"></span><h2><tt class="xref py py-attr docutils literal"><span class="pre">entries[i].content[j].type</span></tt><a class="headerlink" href="#entries-i-content-j-type" title="Permalink to this headline">¶</a></h2>
<p>The content type of this piece of content.</p>
<p>Most likely values for <cite>type</cite>:</p>
<ul class="simple">
<li><em class="mimetype">text/plain</em></li>
<li><em class="mimetype">text/html</em></li>
<li><em class="mimetype">application/xhtml+xml</em></li>
</ul>
<p>For Atom feeds, the content type is taken from the type attribute, which
defaults to <em class="mimetype">text/plain</em> if not specified.  For
<abbr title="Rich Site Summary">RSS</abbr> feeds, the content type is auto-determined by
inspecting the content, and defaults to <em class="mimetype">text/html</em>.  Note that this
may cause silent data loss if the value contains plain text with angle
brackets.  There is nothing I can do about this problem; it is a limitation of
<abbr title="Rich Site Summary">RSS</abbr>.</p>
<p>Future enhancement: some versions of <abbr title="Rich Site Summary">RSS</abbr> clearly
specify that certain values default to <em class="mimetype">text/plain</em>, and
<strong class="program">Universal Feed Parser</strong> should respect this, but it doesn&#8217;t yet.</p>
</div>
<div class="section" id="entries-i-content-j-language">
<span id="reference-entry-content-language"></span><h2><tt class="xref py py-attr docutils literal"><span class="pre">entries[i].content[j].language</span></tt><a class="headerlink" href="#entries-i-content-j-language" title="Permalink to this headline">¶</a></h2>
<p>The language of this piece of content.</p>
<p><tt class="xref py py-attr docutils literal"><span class="pre">language</span></tt> is supposed to be a language code,
as specified by <span class="target" id="index-0"></span><a class="rfc reference external" href="http://tools.ietf.org/html/rfc3066.html"><strong>RFC 3066</strong></a>, but publishers have been known to publish random
values like &#8220;English&#8221; or &#8220;German&#8221;.  <strong class="program">Universal Feed Parser</strong> does not
do any parsing or normalization of language codes.</p>
<p><tt class="xref py py-attr docutils literal"><span class="pre">language</span></tt> may come from the element&#8217;s xml:lang
attribute, or it may inherit from a parent element&#8217;s xml:lang, or the
<em class="mailheader">Content-Language</em> <abbr title="Hypertext Transfer Protocol">HTTP</abbr>
header.  If the feed does not specify a language,
<tt class="xref py py-attr docutils literal"><span class="pre">language</span></tt> will be <tt class="docutils literal"><span class="pre">None</span></tt>, the
<strong class="program">Python</strong> null value.</p>
</div>
<div class="section" id="entries-i-content-j-base">
<span id="reference-entry-content-base"></span><h2><tt class="xref py py-attr docutils literal"><span class="pre">entries[i].content[j].base</span></tt><a class="headerlink" href="#entries-i-content-j-base" title="Permalink to this headline">¶</a></h2>
<p>The original base <abbr title="Uniform Resource Identifier">URI</abbr> for links within
this piece of content.</p>
<p><tt class="xref py py-attr docutils literal"><span class="pre">base</span></tt> is only useful in rare situations and
can usually be ignored.  It is the original base
<abbr title="Uniform Resource Identifier">URI</abbr> for this value, as specified by the
element&#8217;s xml:base attribute, or a parent element&#8217;s xml:base, or the
appropriate <abbr title="Hypertext Transfer Protocol">HTTP</abbr> header, or the
<abbr title="Uniform Resource Identifier">URI</abbr> of the feed.  (See
<a class="reference internal" href="resolving-relative-links.html#advanced-base"><em>Relative Link Resolution</em></a> for more details.)  By the time you see it,
<strong class="program">Universal Feed Parser</strong> has already resolved relative links in all
values where it makes sense to do so.  <em>Clients should never need to manually
resolve relative links.</em></p>
<p class="rubric">Comes from</p>
<ul class="simple">
<li>/atom03:feed/atom03:entry/atom03:content</li>
<li>/atom10:feed/atom10:entry/atom10:content</li>
<li>/rdf:RDF/rdf:item/content:encoded</li>
<li>/rss/channel/item/body</li>
<li>/rss/channel/item/content:encoded</li>
<li>/rss/channel/item/fullitem</li>
<li>/rss/channel/item/xhtml:body</li>
</ul>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#"><tt class="docutils literal"><span class="pre">entries[i].content</span></tt></a><ul>
<li><a class="reference internal" href="#entries-i-content-j-value"><tt class="docutils literal"><span class="pre">entries[i].content[j].value</span></tt></a></li>
<li><a class="reference internal" href="#entries-i-content-j-type"><tt class="docutils literal"><span class="pre">entries[i].content[j].type</span></tt></a></li>
<li><a class="reference internal" href="#entries-i-content-j-language"><tt class="docutils literal"><span class="pre">entries[i].content[j].language</span></tt></a></li>
<li><a class="reference internal" href="#entries-i-content-j-base"><tt class="docutils literal"><span class="pre">entries[i].content[j].base</span></tt></a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="reference-entry-comments.html"
                        title="previous chapter"><tt class="docutils literal docutils literal docutils literal"><span class="pre">entries[i].comments</span></tt></a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="reference-entry-contributors.html"
                        title="next chapter"><tt class="docutils literal"><span class="pre">entries[i].contributors</span></tt></a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/reference-entry-content.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <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="reference-entry-contributors.html" title="entries[i].contributors"
             >next</a> |</li>
        <li class="right" >
          <a href="reference-entry-comments.html" title="entries[i].comments"
             >previous</a> |</li>
        <li><a href="index.html">feedparser 5.1.3 documentation</a> &raquo;</li>
          <li><a href="reference.html" >Reference</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2004-2008 Mark Pilgrim, 2010-2012 Kurt McKee.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>