Source

webstring / docs / text.rst

<?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet href="webstring.css" type="text/css" media="screen" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>webstring: Introduction to TextTemplate</title> <link href="webstring.css" rel="stylesheet" type="text/css" media="screen" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <div class="toc"> <div class="entry"><a href="#classes">Class</a></div> <div class="entry"><a href="#initialization">Initialization</a></div> <div class="entry"><a href="#objects">Objects</a></div> <div class="entry"><a href="#dataaccess">Access</a></div> <div class="entry"><a href="#sub">Substitution</a></div> <div class="entry"><a href="#batch">Batch Substitution</a></div> <div class="entry"><a href="#state">State</a></div> <div class="entry"><a href="#add">Concatenation </a></div> <div class="entry"><a href="#mul">Repetition</a></div> <div class="entry"><a href="#iter">Iteration</a></div> <div class="entry"><a href="#out">Output</a></div> </div> <div class="header"><img class="headerimg" src="webstring.gif" width="400" height="201" alt="webstring" />

<div class="headertext">Introduction to TextTemplate</div></div>

<div class="textheader"><a id="classes">CLASS</a></div> <div class="textblock">While* webstring's *other specialized classes

only handle XML and HTML templating, TextTemplate can handle templating for any text format, including XML and HTML.<br /> <br /> TextTemplate can be used as a standalone import: </div> <div class="codeblock"><pre>&gt;&gt;&gt; <span class="keyword">from</span> webstring <span class="keyword">import</span> TextTemplate</pre></div>
<div class="textblock">It can also be used through *webstring's *Template
class, a general frontend to all of webstring's specialized classes.</div>

<div class="textheader"><a id="initialization">INITIALIZATION</a></div> <div class="textblock">A TextTemplate object can be initialized empty:</div> <div class="codeblock"><pre>&gt;&gt;&gt; exampleA = TextTemplate()</pre></div> <div class="textblock">From a file with the fromfile method:</div> <div class="codeblock"><pre>&gt;&gt;&gt; exampleB.fromfile(<span class="string">'example.rss'</span>)</pre></div> <div class="textblock">By passing the path to the file as the first argument to the class constructor:</div> <div class="codeblock"><pre>&gt;&gt;&gt; exampleC = TextTemplate(<span class="string">'example.rss'</span>)</pre></div> <div class="textblock">From a string with the fromstring method:</div> <div class="codeblock"><pre>&gt;&gt;&gt; exampleD = TextTemplate.fromstring(<span class="string">&quot;&quot;&quot;&lt;rss version=&quot;2.0&quot;&gt;</span><br />... <span class="string">&lt;channel&gt;</span><br />... <span class="string">&lt;title&gt;Example&lt;/title&gt;</span><br />... <span class="string">&lt;link&gt;http://www.example.org/&lt;/link&gt;</span><br />... <span class="string">&lt;description&gt;RSS Example&lt;/description&gt;</span><br />... <span class="string">&lt;language&gt;en-us&lt;/language&gt;</span><br />... <span class="string">$$cpubdate&lt;pubDate&gt;$month$ $day$, $year$&lt;/pubDate&gt;$$</span><br />... <span class="string">$$lastbuilddate&lt;lastBuildDate&gt;$month$ $day$, $year$&lt;/lastBuildDate&gt;$$</span> ... <span class="string">$$item&lt;item&gt;</span><br />... <span class="string">&lt;title&gt;$title$&lt;/title&gt;</span><br />... <span class="string">&lt;link&gt;$link$&lt;/link&gt;</span><br />... <span class="string">&lt;guid isPermaLink=&quot;true&quot;&gt;$guid$&lt;/guid&gt;</span><br />... <span class="string">&lt;description&gt;$description$&lt;/description&gt;</span><br />... <span class="string">&lt;pubDate&gt;$ipubdate$&lt;/pubDate&gt;</span><br />... <span class="string">&lt;/item&gt;</span><br />... <span class="string">$$&lt;/channel&gt;</span><br />... <span class="string">&lt;/rss&gt;&quot;&quot;&quot;</span>)</pre></div> <div class="textblock">By passing a string as the first argument to the class constructor:</div> <div class="codeblock"><pre>&gt;&gt;&gt; example = TextTemplate(<span class="string">&quot;&quot;&quot;&lt;rss version=&quot;2.0&quot;&gt;</span><br />... <span class="string">&lt;channel&gt;</span><br />... <span class="string">&lt;title&gt;Example&lt;/title&gt;</span><br />... <span class="string">&lt;link&gt;http://www.example.org/&lt;/link&gt;</span><br />... <span class="string">&lt;description&gt;RSS Example&lt;/description&gt;</span><br />... <span class="string">&lt;language&gt;en-us&lt;/language&gt;</span><br />... <span class="string">$$cpubdate&lt;pubDate&gt;$month$ $day$, $year$&lt;/pubDate&gt;$$</span><br />... <span class="string">$$lastbuilddate&lt;lastBuildDate&gt;$month$ $day$, $year$&lt;/lastBuildDate&gt;$$</span> ... <span class="string">$$item&lt;item&gt;</span><br />... <span class="string">&lt;title&gt;$title$&lt;/title&gt;</span><br />... <span class="string">&lt;link&gt;$link$&lt;/link&gt;</span><br />... <span class="string">&lt;guid isPermaLink=&quot;true&quot;&gt;$guid$&lt;/guid&gt;</span><br />... <span class="string">&lt;description&gt;$description$&lt;/description&gt;</span><br />... <span class="string">&lt;pubDate&gt;$ipubdate$&lt;/pubDate&gt;</span><br />... <span class="string">&lt;/item&gt;</span><br />... <span class="string">$$&lt;/channel&gt;</span><br />... <span class="string">&lt;/rss&gt;&quot;&quot;&quot;</span>)</pre></div> <div class="textblock">To use TextTemplate through the Template class, you

pass the value text * with the *format keyword to the Template class's constructor:</div>

<div class="codeblock"><pre>&gt;&gt;&gt; example = Template(format="text")</pre></div> <div class="textheader"><a id="objects">OBJECTS</a></div> <div class="textblock">*webstring* automatically maps a template to a root

object. Field placeholders within the template are an alphanumeric value that uniquely identifies the field placeholder within the template preceded and terminated by a placeholder marker (by default, <strong>$</strong>). Field placeholders are automatically mapped to field objects with the same name as the field placeholder and attached to the parent template's root object.</div>

<div class="codeblock"><pre class="stdout">$$cpubdate&lt;pubDate&gt;<span class="highlight">$month$</span> $day$, $year$&lt;/pubDate&gt;$$</pre></div> <div class="textblock">Group placeholders within the template are blocks of text

containing field placeholders preceded and terminated by a group placeholder marker (by default, <strong>$$</strong>). The alphanumeric value immediately following the opening group placeholder marker uniquely identifies the group within the template. webstring automatically maps the group placeholder to a group object with the same name as the group placeholder and attaches it to the parent template's root object. Field placeholders within group are mapped to field objects and attached to the group object.</div>

<div class="codeblock"><pre class="stdout"><span class="highlight">$$cpubdate</span>&lt;pubDate&gt;$month$ $day$, $year$&lt;/pubDate&gt;<span class="highlight">$$</span></pre></div> <div class="textblock">Group objects cannot contain other group objects. At maximum, a root's object hierarchy will never be more than three levels deep.<br />

<br />Root level:</div>

<div class="codeblock"><pre>&gt;&gt;&gt; example<br /><span class="stdout">&lt;Template &quot;root&quot; at db7dd0&gt;</span></pre></div> <div class="textblock">Group level:</div> <div class="codeblock"><pre>&gt;&gt;&gt; example.item<br /><span class="stdout">&lt;Template &quot;item&quot; at f5d870&gt;</span></pre></div> <div class="textblock">Field level:</div> <div class="codeblock"><pre>&gt;&gt;&gt; example.item.guid<br /><span class="stdout">&lt;Template &quot;guid&quot; at f5da70&gt;</span></pre></div> <div class="textblock">At minimum, a root object's depth will only be two levels deep.<br /><br />Root level:</div> <div class="codeblock"><pre>&gt;&gt;&gt; example<br /><span class="stdout">&lt;Template &quot;root&quot; at db7dd0&gt;</span></pre></div> <div class="textblock">Field level:</div> <div class="codeblock"><pre>&gt;&gt;&gt; example.cpubdate<br /><span class="stdout">&lt;Template &quot;cpubdate&quot; at e7a350&gt;</span></pre></div> <div class="textblock">By default, all field or group placeholders become part

of a root's object hierarchy except for groups that have no field placeholders within them. However, existing fields or groups within an template can be excluded or included before or after a root object is initialized by using its exclude or include methods.<br /> <br /> Exclusion with the exclude method:</div>

<div class="codeblock"><pre>&gt;&gt;&gt; example.exclude(<span class="string">'cpubdate'</span>) <br />&gt;&gt;&gt; <span class="keyword">print</span> example<br /><span class="stdout">&lt;rss version=&quot;2.0&quot;&gt;<br /> &lt;channel&gt;<br /> &lt;title&gt;Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/&lt;/link&gt;<br /> &lt;description&gt;RSS Example&lt;/description&gt;<br /> &lt;language&gt;en-us&lt;/language&gt;<br /> &lt;lastBuildDate&gt; , &lt;/lastBuildDate&gt;<br /> &lt;item&gt;<br /> &lt;title&gt;&lt;/title&gt;<br /> &lt;link&gt;&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;&lt;/guid&gt;<br /> &lt;description&gt;&lt;/description&gt;<br /> &lt;pubDate&gt;&lt;/pubDate&gt;<br /> &lt;/item&gt;<br /> &lt;/channel&gt;<br /> &lt;/rss&gt;</span></pre></div> <div class="textblock">Inclusion with the include method:</div> <div class="codeblock"><pre>&gt;&gt;&gt; example.include(<span class="string">'cpubdate'</span>)<br />&gt;&gt;&gt; <span class="keyword">print</span> example<br /><span class="stdout">&lt;rss version=&quot;2.0&quot;&gt;<br /> &lt;channel&gt;<br /> &lt;title&gt;Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/&lt;/link&gt;<br /> &lt;description&gt;RSS Example&lt;/description&gt;<br /> &lt;language&gt;en-us&lt;/language&gt;<br /> </span><span class="highlight">&lt;pubDate&gt; , &lt;/pubDate&gt;</span><span class="stdout"><br /> &lt;lastBuildDate&gt; , &lt;/lastBuildDate&gt;

&lt;item&gt;<br /> &lt;title&gt;&lt;/title&gt;<br /> &lt;link&gt;&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;&lt;/guid&gt;<br /> &lt;description&gt;&lt;/description&gt;<br /> &lt;pubDate&gt;&lt;/pubDate&gt;<br /> &lt;/item&gt;<br /> &lt;/channel&gt;<br /> &lt;/rss&gt;</span></pre></div>
<div class="textblock">Fields and groups can be removed by deleting
their object attribute:</div>

<div class="codeblock"><pre>&gt;&gt;&gt; <span class="keyword">del</span> example.cpubdate<br />&gt;&gt;&gt; <span class="keyword">print</span> example<br /><span class="stdout">&lt;rss version=&quot;2.0&quot;&gt;<br /> &lt;channel&gt;<br /> &lt;title&gt;Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/&lt;/link&gt;<br /> &lt;description&gt;RSS Example&lt;/description&gt;<br /> &lt;language&gt;en-us&lt;/language&gt;<br /> &lt;lastBuildDate&gt; , &lt;/lastBuildDate&gt;<br /> &lt;item&gt;<br /> &lt;title&gt;&lt;/title&gt;<br /> &lt;link&gt;&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;&lt;/guid&gt;<br /> &lt;description&gt;&lt;/description&gt;<br /> &lt;pubDate&gt;&lt;/pubDate&gt;<br /> &lt;/item&gt;<br /> &lt;/channel&gt;<br /> &lt;/rss&gt;</span></pre></div> <div class="textblock">A root, field, or group can be set back to its default state by calling

its reset method:</div>
<div class="codeblock"><pre>&gt;&gt;&gt; example.reset()<br />&gt;&gt;&gt; <span class="keyword">print</span> example<br /><span class="stdout">&lt;rss version=&quot;2.0&quot;&gt;<br /> &lt;channel&gt;<br /> &lt;title&gt;Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/&lt;/link&gt;<br /> &lt;description&gt;RSS Example&lt;/description&gt;<br /> &lt;language&gt;en-us&lt;/language&gt;<br /> &lt;pubDate&gt; , &lt;/pubDate&gt;<br /> &lt;lastBuildDate&gt; , &lt;/lastBuildDate&gt;
&lt;item&gt;<br /> &lt;title&gt;&lt;/title&gt;<br /> &lt;link&gt;&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;&lt;/guid&gt;<br /> &lt;description&gt;&lt;/description&gt;<br /> &lt;pubDate&gt;&lt;/pubDate&gt;<br /> &lt;/item&gt;<br /> &lt;/channel&gt;<br /> &lt;/rss&gt;</span></pre></div>

<div class="textheader"><a id="dataaccess">ACCESS</a></div> <div class="textblock">Fields can be accessed by object attribute:</div> <div class="codeblock"><pre>&gt;&gt;&gt; example.cpubdate<br /><span class="stdout">&lt;Template &quot;cpubdate&quot; at e7a350&gt;</span></pre></div> <div class="textblock">By keyword:</div> <div class="codeblock"><pre>&gt;&gt;&gt; example[<span class="string">'cpubdate'</span>]<br /><span class="stdout">&lt;Template &quot;cpubdate&quot; at e7a350&gt;</span></pre></div> <div class="textblock">By position:</div> <div class="codeblock"><pre>&gt;&gt;&gt; example[<span class="int">0</span>]<br /><span class="stdout">&lt;Template &quot;cpubdate&quot; at e7a350&gt;</span></pre></div> <div class="textblock">Groups are accessed the same way:</div> <div class="codeblock"><pre>&gt;&gt;&gt; example.item <br /><span class="stdout">&lt;Template &quot;item&quot; at f5d870&gt;</span><br />&gt;&gt;&gt; example[<span class="string">'item'</span>]<br /><span class="stdout">&lt;Template &quot;item&quot; at f5d870&gt;</span><br />&gt;&gt;&gt; example[<span class="int">2</span>]<br /><span class="stdout">&lt;Template &quot;item&quot; at f5d870&gt;</span></pre></div> <div class="textblock">Fields within a group are accessed by combining its identifier and its group identifier:</div> <div class="codeblock"><pre>&gt;&gt;&gt; example.item.title <br /><span class="stdout">&lt;Template &quot;title&quot; at f5d9b0&gt;</span><br />&gt;&gt;&gt; example[<span class="string">'item'</span>][<span class="string">'title'</span>]<br /><span class="stdout">&lt;Template &quot;title&quot; at f5d9b0&gt;</span><br />&gt;&gt;&gt; example[<span class="int">2</span>][<span class="int">0</span>]<br /><span class="stdout">&lt;Template &quot;title&quot; at f5d9b0&gt;</span></pre></div> <div class="textblock">By default, webstring automatically maps fields,

groups, and attributes to object attributes with the same name as the field or group placeholder's identifier. This &quot;auto-magical&quot; behavior can be disabled by passing a boolean value of <span class="keyword">False</span> to the class constructor as the second argument when a TextTemplate object is initialized:</div>

<div class="codeblock"><pre>&gt;&gt;&gt; exampleZ = TextTemplate(<span class="string">'example.rss', </span><span class="keyword">False</span>)</pre></div> <div class="textblock">Fields and groups can then be accessed by keyword or position

but not by named object attribute.</div>

<div class="textheader"><a id="sub">SUBSTITUTION</a></div> <div class="textblock">Text can be substituted into a field by assigning a string to a field's text property:</div> <div class="codeblock"><pre>&gt;&gt;&gt; example.item.description.text = <span class="string">'Assigning text to a field.'</span> &gt;&gt;&gt; <span class="keyword">print</span> example<br /><span class="stdout">&lt;rss version=&quot;2.0&quot;&gt;<br /> &lt;channel&gt;<br /> &lt;title&gt;Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/&lt;/link&gt;<br /> &lt;description&gt;RSS Example&lt;/description&gt;<br /> &lt;language&gt;en-us&lt;/language&gt;<br /> &lt;pubDate&gt; , &lt;/pubDate&gt;<br /> &lt;lastBuildDate&gt; , &lt;/lastBuildDate&gt;

&lt;item&gt;<br /> &lt;title&gt;&lt;/title&gt;<br /> &lt;link&gt;&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;&lt;/guid&gt;<br /> &lt;description&gt;</span><span class="highlight">Assigning text to a field.</span><span class="stdout">&lt;/description&gt;<br /> &lt;pubDate&gt;&lt;/pubDate&gt;<br /> &lt;/item&gt;<br /> &lt;/channel&gt;<br /> &lt;/rss&gt;</span></pre></div>
<div class="textblock">Alternatively, text can be substituted into a field using
the modulo assignment operator (<strong>%=</strong>). Using the modulo operator without the assignment operator
(<strong>%</strong>) creates a new object. Using the modulo operator with the assignment operator (<strong>%=</strong>) modifies the left-hand object.</div>

<div class="codeblock"><pre>&gt;&gt;&gt; example.item.description %= <span class="string">'Example of assigning text to a field.'</span> &gt;&gt;&gt; <span class="keyword">print</span> example<br /><span class="stdout">&lt;rss version=&quot;2.0&quot;&gt;<br /> &lt;channel&gt;<br /> &lt;title&gt;Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/&lt;/link&gt;<br /> &lt;description&gt;RSS Example&lt;/description&gt;<br /> &lt;language&gt;en-us&lt;/language&gt;<br /> &lt;pubDate&gt; , &lt;/pubDate&gt;<br /> &lt;lastBuildDate&gt; , &lt;/lastBuildDate&gt;

&lt;item&gt;<br /> &lt;title&gt;&lt;/title&gt;<br /> &lt;link&gt;&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;&lt;/guid&gt;<br /> &lt;description&gt;</span><span class="highlight">Example of assigning text to a field.</span><span class="stdout">&lt;/description&gt;<br /> &lt;pubDate&gt;&lt;/pubDate&gt;<br /> &lt;/item&gt;<br /> &lt;/channel&gt;<br /> &lt;/rss&gt;</span></pre></div>
<div class="textblock">The <strong>%= </strong>operator can also be used to substitute
text into a group using a dictionary containing key/value pairs where the key is the name of the field inside the group and the value is the text that will be assigned to the field:</div>

<div class="codeblock"><pre>&gt;&gt;&gt; example.cpubdate %= {<span class="string">'month'</span>:<span class="string">'June'</span>, <span class="string">'day'</span>:<span class="string">'06'</span>, <span class="string">'year'</span>:<span class="string">'2006'</span>} &gt;&gt;&gt; example.lastbuilddate %= {<span class="string">'month'</span>:<span class="string">'June'</span>, <span class="string">'day'</span>:<span class="string">'06'</span>, <span class="string">'year'</span>:<span class="string">'2006'</span>}<br />&gt;&gt;&gt; <span class="keyword">print</span> example<br /><span class="stdout">&lt;rss version=&quot;2.0&quot;&gt;<br /> &lt;channel&gt;<br /> &lt;title&gt;Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/&lt;/link&gt;<br /> &lt;description&gt;RSS Example&lt;/description&gt;<br /> &lt;language&gt;en-us&lt;/language&gt;<br /> &lt;pubDate&gt;</span><span class="highlight">June 06, 2006</span><span class="stdout">&lt;/pubDate&gt;<br /> &lt;lastBuildDate&gt;</span><span class="highlight">June 06, 2006</span><span class="stdout">&lt;/lastBuildDate&gt;

&lt;item&gt;<br /> &lt;title&gt;&lt;/title&gt;<br /> &lt;link&gt;&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;&lt;/guid&gt;<br /> &lt;description&gt;Example of assigning text to a field.&lt;/description&gt;<br /> &lt;pubDate&gt;&lt;/pubDate&gt;</span><span class="stdout"><br /> &lt;/item&gt;<br /> &lt;/channel&gt;<br /> &lt;/rss&gt;</span></pre></div>

<div class="textheader"><a id="batch">BATCH SUBSTITUTION</a></div> <div class="textblock">The modulo operator can also be used to substitute text into a template in

one batch substitution. Text values for fields and groups within a template are passed in a dictionary containing key/value pairs where the key is the field or group identifier and the value is the text to be substituted. Fields within a group are passed in a dictionary that is stored under the keyword identifying the group:</div>

<div class="codeblock"><pre>&gt;&gt;&gt; example %= {<br />... <span class="string">'cpubdate'</span>:{<span class="string">'month'</span>:<span class="string">'June'</span>, <span class="string">'day'</span>:<span class="string">'06'</span>, <span class="string">'year'</span>:<span class="string">'2006'</span>}, <br />... <span class="string">'lastbuilddate'</span>:{<span class="string">'month'</span>:<span class="string">'June'</span>, <span class="string">'day'</span>:<span class="string">'06'</span>, <span class="string">'year'</span>:<span class="string">'2006'</span>},<br />... <span class="string">'item'</span>:{<span class="string">'title'</span>:<span class="string">Example Title: First Example'</span>,<br />... <span class="string">'link'</span>:'<span class="string">http://www.example.org/rss/5423093'</span>,<br />... <span class="string">'guid'</span>:'<span class="string">http://www.example.org/rss/5423093'</span>,<br />... <span class="string">'description'</span>:<span class="string">'Example of assigning text to a field.'</span>,<br />... <span class="string">'ipubdate'</span>:<span class="string">'June </span><span class="string">6, </span><span class="string">2006'</span>}}<br />&gt;&gt;&gt; <span class="keyword">print</span> example<br /><span class="stdout">&lt;rss version=&quot;2.0&quot;&gt;<br /> &lt;channel&gt;<br /> &lt;title&gt;Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/&lt;/link&gt;<br /> &lt;description&gt;RSS Example&lt;/description&gt;<br /> &lt;language&gt;en-us&lt;/language&gt;<br /> &lt;pubDate&gt;</span><span class="highlight">June 06, 2006</span><span class="stdout">&lt;/pubDate&gt;<br /> &lt;lastBuildDate&gt;</span><span class="highlight">June 06, 2006</span><span class="stdout">&lt;/lastBuildDate&gt;<br /> &lt;item&gt;<br /> &lt;title&gt;</span><span class="highlight">Example Title: First Example</span><span class="stdout">&lt;/title&gt;<br /> &lt;link&gt;</span><span class="highlight">http://www.example.org/rss/5423093</span><span class="stdout">&lt;/link&gt;<br /> &lt;guid </span><span class="stdout">isPermaLink=&quot;true&quot;&gt;</span><span class="highlight">http://www.example.org/rss/5423093</span><span class="stdout">&lt;/guid&gt;<br /> &lt;description&gt;</span><span class="highlight">Example of assigning text to a field.</span><span class="stdout">&lt;/description&gt;<br /> &lt;pubDate&gt;</span><span class="highlight">June 06, 2006</span><span class="stdout">&lt;/pubDate&gt;<br /> &lt;/item&gt;<br /> &lt;/channel&gt;<br /> &lt;/rss&gt;</span></pre></div> <div class="textheader"><a id="state">STATE</a></div> <div class="textblock">Each root, field, or group has a current and a default property. The current property returns the object's current state:</div> <div class="codeblock"><pre>&gt;&gt;&gt; example.current<br /><span class="stdout">&lt;Template &quot;root&quot; at dcd290&gt;</span><br />&gt;&gt;&gt; <span class="keyword">print</span> example.current<br /><span class="stdout">&lt;rss version=&quot;2.0&quot;&gt;<br /> &lt;channel&gt;<br /> &lt;title&gt;Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/&lt;/link&gt;<br /> &lt;description&gt;RSS Example&lt;/description&gt;<br /> &lt;language&gt;en-us&lt;/language&gt;<br /> &lt;pubDate&gt;June 06, 2006&lt;/pubDate&gt;<br /> &lt;lastBuildDate&gt;June 06, 2006&lt;/lastBuildDate&gt;<br /> &lt;item&gt;<br /> &lt;title&gt;Example Title: First Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/rss/5423093&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;http://www.example.org/rss/5423093&lt;/guid&gt;<br /> &lt;description&gt;Example of assigning text to a field.&lt;/description&gt;<br /> &lt;pubDate&gt;June 06, 2006&lt;/pubDate&gt;<br /> &lt;/item&gt;<br /> &lt;/channel&gt;<br /> &lt;/rss&gt;</span></pre></div> <div class="textblock">The default property returns the object's

default state:</div>
<div class="codeblock"><pre>&gt;&gt;&gt; example.default<br /><span class="stdout">&lt;Template &quot;root&quot; at f62d10&gt;</span><br />&gt;&gt;&gt; <span class="keyword">print</span> example.default<br /><span class="stdout">&lt;rss version=&quot;2.0&quot;&gt;<br /> &lt;channel&gt;<br /> &lt;title&gt;Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/&lt;/link&gt;<br /> &lt;description&gt;RSS Example&lt;/description&gt;<br /> &lt;language&gt;en-us&lt;/language&gt;<br /> &lt;pubDate&gt; , &lt;/pubDate&gt;<br /> &lt;lastBuildDate&gt; , &lt;/lastBuildDate&gt;
&lt;item&gt;<br /> &lt;title&gt;&lt;/title&gt;<br /> &lt;link&gt;&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;&lt;/guid&gt;<br /> &lt;description&gt;&lt;/description&gt;<br /> &lt;pubDate&gt;&lt;/pubDate&gt;<br /> &lt;/item&gt;<br /> &lt;/channel&gt;<br /> &lt;/rss&gt;</span></pre></div>

<div class="textheader"><a id="add">CONCATENATION</a></div> <div class="textblock">Roots, fields, and groups can be concatenated together using the addition operator.<br /><br />Roots:</div> <div class="codeblock"><pre>&gt;&gt;&gt; example.reset()<br />&gt;&gt;&gt; <span class="keyword">print</span> example + example<br /><span class="stdout">&lt;rss version=&quot;2.0&quot;&gt;<br /> &lt;channel&gt;<br /> &lt;title&gt;Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/&lt;/link&gt;<br /> &lt;description&gt;RSS Example&lt;/description&gt;<br /> &lt;language&gt;en-us&lt;/language&gt;<br /> &lt;pubDate&gt; , &lt;/pubDate&gt;<br /> &lt;lastBuildDate&gt; , &lt;/lastBuildDate&gt;

&lt;item&gt;<br /> &lt;title&gt;&lt;/title&gt;<br /> &lt;link&gt;&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;&lt;/guid&gt;<br /> &lt;description&gt;&lt;/description&gt;<br /> &lt;pubDate&gt;&lt;/pubDate&gt;<br /> &lt;/item&gt;<br /> &lt;/channel&gt;<br /> &lt;/rss&gt;</span><span class="highlight">&lt;rss version=&quot;2.0&quot;&gt;
&lt;channel&gt;<br /> &lt;title&gt;Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/&lt;/link&gt;<br /> &lt;description&gt;RSS Example&lt;/description&gt;<br /> &lt;language&gt;en-us&lt;/language&gt;<br /></span> <span class="highlight">&lt;pubDate&gt; , &lt;/pubDate&gt;<br /> &lt;lastBuildDate&gt; , &lt;/lastBuildDate&gt;
&lt;item&gt;<br /> &lt;title&gt;&lt;/title&gt;<br /> &lt;link&gt;&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;&lt;/guid&gt;<br /> &lt;description&gt;&lt;/description&gt;<br /> &lt;pubDate&gt;&lt;/pubDate&gt;<br /> &lt;/item&gt;<br /> &lt;/channel&gt;

&lt;/rss&gt;</span></pre></div>

<div class="textblock">Groups:</div> <div class="codeblock"><pre>&gt;&gt;&gt; <span class="keyword">print</span> example.item + example.item<br /><span class="stdout">&lt;item&gt;<br /> &lt;title&gt;&lt;/title&gt;<br /> &lt;link&gt;&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;&lt;/guid&gt;<br /> &lt;description&gt;&lt;/description&gt;<br /> &lt;pubDate&gt;&lt;/pubDate&gt;<br /> &lt;/item&gt;<br /> </span><span class="highlight">&lt;item&gt;<br /> &lt;title&gt;&lt;/title&gt;<br /> &lt;link&gt;&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;&lt;/guid&gt;<br /> &lt;description&gt;&lt;/description&gt;<br /> &lt;pubDate&gt;&lt;/pubDate&gt;<br /> &lt;/item&gt;</span></pre></div> <div class="textblock">Concatenating empty fields produces no output:</div> <div class="codeblock"><pre>&gt;&gt;&gt; <span class="keyword">print</span> example.item.title + example.item.title<br /></pre> </div> <div class="textblock">Using the addition operator (<strong>+</strong>) without the assignment operator (<strong>=</strong>) results in a new object. Using

the addition and assignment operators together (<strong>+=</strong>) modifies the left-hand object:</div>
<div class="codeblock"><pre>&gt;&gt;&gt; example.item += example.item<br />&gt;&gt;&gt; <span class="keyword">print</span> example<br /><span class="stdout">&lt;rss version=&quot;2.0&quot;&gt;<br /> &lt;channel&gt;<br /> &lt;title&gt;Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/&lt;/link&gt;<br /> &lt;description&gt;RSS Example&lt;/description&gt;<br /> &lt;language&gt;en-us&lt;/language&gt;<br /> &lt;pubDate&gt; , &lt;/pubDate&gt;<br /> &lt;lastBuildDate&gt; , &lt;/lastBuildDate&gt;
&lt;item&gt;<br /> &lt;title&gt;&lt;/title&gt;<br /> &lt;link&gt;&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;&lt;/guid&gt;<br /> &lt;description&gt;&lt;/description&gt;<br /> &lt;pubDate&gt;&lt;/pubDate&gt;<br /> &lt;/item&gt;<br /></span><span class="highlight"> &lt;item&gt;<br /> &lt;title&gt;&lt;/title&gt;<br /> &lt;link&gt;&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;&lt;/guid&gt;<br /> &lt;description&gt;&lt;/description&gt;<br /> &lt;pubDate&gt;&lt;/pubDate&gt;<br /> &lt;/item&gt;</span><span class="stdout"><br /> &lt;/channel&gt;<br /> &lt;/rss&gt;</span></pre></div>

<div class="textblock">Other Template objects or strings can be appended to a root, field, or group using their* append* method.</div> <div class="textheader"><a id="mul">REPETITION</a></div> <div class="textblock">A root, group, or field can be repeated once by calling its repeat method:</div> <div class="codeblock"><pre>&gt;&gt;&gt; example.reset()<br />&gt;&gt;&gt; example.item.repeat()<br />&gt;&gt;&gt; <span class="keyword">print</span> example<br /><span class="stdout">&lt;rss version=&quot;2.0&quot;&gt;<br /> &lt;channel&gt;<br /> &lt;title&gt;Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/&lt;/link&gt;<br /> &lt;description&gt;RSS Example&lt;/description&gt;<br /> &lt;language&gt;en-us&lt;/language&gt;<br /> &lt;pubDate&gt; , &lt;/pubDate&gt;<br /> &lt;lastBuildDate&gt; , &lt;/lastBuildDate&gt;

&lt;item&gt;<br /> &lt;title&gt;&lt;/title&gt;<br /> &lt;link&gt;&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;&lt;/guid&gt;<br /> &lt;description&gt;&lt;/description&gt;<br /> &lt;pubDate&gt;&lt;/pubDate&gt;<br /> &lt;/item&gt;<br /></span><span class="highlight"> &lt;item&gt;<br /> &lt;title&gt;&lt;/title&gt;<br /> &lt;link&gt;&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;&lt;/guid&gt;<br /> &lt;description&gt;&lt;/description&gt;<br /> &lt;pubDate&gt;&lt;/pubDate&gt;<br /> &lt;/item&gt;</span><span class="stdout"><br /> &lt;/channel&gt;<br /> &lt;/rss&gt;</span></pre></div>
<div class="textblock">A root, group, or field can be repeated more than once by using the multiplication operator, either by itself (<strong>*</strong>),
which returns a new object, or along with the assignment operator (<strong>*=</strong>), which modifies the left-hand object:</div>
<div class="codeblock"><pre>&gt;&gt;&gt; example.reset()<br />&gt;&gt;&gt; example.item *= <span class="int">2</span><br />&gt;&gt;&gt; <span class="keyword">print</span> example<br /><span class="stdout">&lt;rss version=&quot;2.0&quot;&gt;<br /> &lt;channel&gt;<br /> &lt;title&gt;Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/&lt;/link&gt;<br /> &lt;description&gt;RSS Example&lt;/description&gt;<br /> &lt;language&gt;en-us&lt;/language&gt;<br /> &lt;pubDate&gt; , &lt;/pubDate&gt;<br /> &lt;lastBuildDate&gt; , &lt;/lastBuildDate&gt;
&lt;item&gt;<br /> &lt;title&gt;&lt;/title&gt;<br /> &lt;link&gt;&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;&lt;/guid&gt;<br /> &lt;description&gt;&lt;/description&gt;<br /> &lt;pubDate&gt;&lt;/pubDate&gt;<br /> &lt;/item&gt;<br /></span><span class="highlight"> &lt;item&gt;<br /> &lt;title&gt;&lt;/title&gt;<br /> &lt;link&gt;&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;&lt;/guid&gt;<br /> &lt;description&gt;&lt;/description&gt;<br /> &lt;pubDate&gt;&lt;/pubDate&gt;<br /> &lt;/item&gt;</span><span class="stdout"><br /> &lt;/channel&gt;<br /> &lt;/rss&gt;</span></pre></div>
<div class="textblock">A root, field, or group can be repeated and have text substituted into it by passing a string, tuple, or dictionary to its repeat
method:</div>

<div class="codeblock"><pre>&gt;&gt;&gt; example.reset()<br />&gt;&gt;&gt; example.item %= ( ... <span class="string">'Example Title: First Example'</span>, ... <span class="string">'http://www.example.org/rss/5423092'</span>, ... <span class="string">'http://www.example.org/rss/5423092'</span>, ... <span class="string">'Example of assigning text to a field.'</span>, ... <span class="string">'June 06, 2006'</span>)<br />&gt;&gt;&gt; example.item.repeat(( ... <span class="string">'Example Title: Second Example'</span>, ... <span class="string">'http://www.example.org/rss/5423093'</span>, ... <span class="string">'http://www.example.org/rss/5423093'</span>, ... <span class="string">'Example of group repetition.'</span>, ... <span class="string">'June 06, 2006'</span>))<br />&gt;&gt;&gt; <span class="keyword">print</span> example<br /><span class="stdout">&lt;rss version=&quot;2.0&quot;&gt;<br /> &lt;channel&gt;<br /> &lt;title&gt;Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/&lt;/link&gt;<br /> &lt;description&gt;RSS Example&lt;/description&gt;<br /> &lt;language&gt;en-us&lt;/language&gt;<br /> &lt;pubDate&gt; , &lt;/pubDate&gt;<br /> &lt;lastBuildDate&gt; , &lt;/lastBuildDate&gt;<br /> &lt;item&gt;<br /> &lt;title&gt;</span><span class="highlight">Example Title: First Example</span><span class="stdout">&lt;/title&gt;<br /> &lt;link&gt;</span><span class="highlight">http://www.example.org/rss/5423092</span><span class="stdout">&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;</span><span class="highlight">http://www.example.org/rss/5423092</span><span class="stdout">&lt;/guid&gt;<br /> &lt;description&gt;</span><span class="highlight">Example of assigning text to a field.</span><span class="stdout">&lt;/description&gt;<br /> &lt;pubDate&gt;</span><span class="highlight">June 06, 2006</span><span class="stdout">&lt;/pubDate&gt;<br /> &lt;/item&gt;<br /> </span><span class="highlight">&lt;item&gt;<br /> &lt;title&gt;Example Title: Second Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/rss/5423093&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;http://www.example.org/rss/5423093&lt;/guid&gt;<br /> &lt;description&gt;Example of group repetition.&lt;/description&gt;<br /> &lt;pubDate&gt;June 06, 2006&lt;/pubDate&gt;<br /> &lt;/item&gt;</span><span class="stdout"><br /> &lt;/channel&gt;<br /> &lt;/rss&gt;</span></pre></div> <div class="textblock">A root, field, or group can be expanded to fit a sequence of substitutions by using the power operator (<strong>**</strong>) either alone,

which returns a new object, or joined with the assignment operator (<strong>**=</strong>), which modifies the left-hand object:</div>

<div class="codeblock"><pre>&gt;&gt;&gt; example.reset()<br />&gt;&gt;&gt; example.item **= (( ... <span class="string">'Example Title: First Example'</span>, ... <span class="string">'http://www.example.org/rss/5423092'</span>, ... <span class="string">'http://www.example.org/rss/5423092'</span>, ... <span class="string">'Example of assigning text to a field.'</span>, ... <span class="string">'June 06, 2006'</span>), ( ... <span class="string">'Example Title: Second Example'</span>, ... <span class="string">'http://www.example.org/rss/5423093'</span>, ... <span class="string">'http://www.example.org/rss/5423093'</span>, ... <span class="string">'Example of group repetition.'</span>, ... <span class="string">'June 06, 2006'</span>))<br />&gt;&gt;&gt; <span class="keyword">print</span> example<br /><span class="stdout">&lt;rss version=&quot;2.0&quot;&gt;<br /> &lt;channel&gt;<br /> &lt;title&gt;Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/&lt;/link&gt;<br /> &lt;description&gt;RSS Example&lt;/description&gt;<br /> &lt;language&gt;en-us&lt;/language&gt;<br /> &lt;pubDate&gt; , &lt;/pubDate&gt;<br /> &lt;lastBuildDate&gt; , &lt;/lastBuildDate&gt;<br /> &lt;item&gt;<br /> &lt;title&gt;</span><span class="highlight">Example Title: First Example</span><span class="stdout">&lt;/title&gt;<br /> &lt;link&gt;</span><span class="highlight">http://www.example.org/rss/5423092</span><span class="stdout">&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;</span><span class="highlight">http://www.example.org/rss/5423092</span><span class="stdout">&lt;/guid&gt;<br /> &lt;description&gt;</span><span class="highlight">Example of assigning text to a field.</span><span class="stdout">&lt;/description&gt;<br /> &lt;pubDate&gt;</span><span class="highlight">June 06, 2006</span><span class="stdout">&lt;/pubDate&gt;<br /> &lt;/item&gt;<br /> </span><span class="highlight">&lt;item&gt;<br /> &lt;title&gt;Example Title: Second Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/rss/5423093&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;http://www.example.org/rss/5423093&lt;/guid&gt;<br /> &lt;description&gt;Example of group repetition.&lt;/description&gt;<br /> &lt;pubDate&gt;June 06, 2006&lt;/pubDate&gt;<br /> &lt;/item&gt;</span><span class="stdout"><br /> &lt;/channel&gt;<br /> &lt;/rss&gt;</span></pre></div> <div class="textblock">The number of items in each tuple of substitutions must be equal to the number of fields in the root or group to which it is passed.<br />

<br /> The maximum number of repetitions that can be performed on a root, field, or group is controlled by the max property. Assigning a new maximum number of repetitions to the max property assigns the same number to a root or group's child fields or groups. The default value of the max property is 25. Exceeding the maximum repetition value assigned to the max property triggers an exception:</div>

<div class="codeblock"><pre>&gt;&gt;&gt; example.reset()<br />&gt;&gt;&gt; example.max = <span class="int">1</span><br />&gt;&gt;&gt; example.item **= (( ... <span class="string">'Example Title: First Example'</span>, ... <span class="string">'http://www.example.org/rss/5423092'</span>, ... <span class="string">'http://www.example.org/rss/5423092'</span>, ... <span class="string">'Example of assigning text to a field.'</span>, ... <span class="string">'June 06, 2006'</span>), ( ... <span class="string">'Example Title: Second Example'</span>, ... <span class="string">'http://www.example.org/rss/5423093'</span>, ... <span class="string">'http://www.example.org/rss/5423093'</span>, ... <span class="string">'Example of group repetition.'</span>, ... <span class="string">'June 06, 2006'</span>))<br /><span class="highlight">Traceback (most recent call last):<br /> File &quot;&lt;interactive input&gt;&quot;, line 1, in ?<br /> File &quot;base.py&quot;, line 158, in __ipow__<br /> raise TypeError(_exceptions[0])<br />TypeError: maximum allowed repetitions exceeded</span></pre></div> <div class="textblock">Setting the max property to a number greater than 1 allows the operation to be completed successfully.</div> <div class="textheader"><a id="iter">ITERATION</a></div> <div class="textblock">Performing a loop operation on a root or group iterates over its fields or groups in sequence:</div> <div class="codeblock"><pre>&gt;&gt;&gt; <span class="keyword">for</span> field <span class="keyword">in</span> example: field.__repr__()<br />... <br /><span class="stdout">'&lt;Template &quot;cpubdate&quot; at f62f50&gt;'<br />'&lt;Template &quot;lastbuilddate&quot; at e7a350&gt;'<br />'&lt;Template &quot;item&quot; at f627f0&gt;'</span></pre></div> <div class="textheader"><a id="out">OUTPUT</a></div> <div class="textblock">The render method is called to output an template as a string:</div> <div class="codeblock"><pre>&gt;&gt;&gt; <span class="keyword">print</span> example.render()<br /><span class="stdout">&lt;rss version=&quot;2.0&quot;&gt;<br /> &lt;channel&gt;<br /> &lt;title&gt;Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/&lt;/link&gt;<br /> &lt;description&gt;RSS Example&lt;/description&gt;<br /> &lt;language&gt;en-us&lt;/language&gt;<br /> &lt;pubDate&gt; , &lt;/pubDate&gt;<br /> &lt;lastBuildDate&gt; , &lt;/lastBuildDate&gt;<br /> &lt;item&gt;<br /> &lt;title&gt;Example Title: First Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/rss/5423092&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;http://www.example.org/rss/5423092&lt;/guid&gt;<br /> &lt;description&gt;Example of assigning text to a field.&lt;/description&gt;<br /> &lt;pubDate&gt;June 06, 2006&lt;/pubDate&gt;<br /> &lt;/item&gt;<br /> &lt;item&gt;<br /> &lt;title&gt;Example Title: Second Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/rss/5423093&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;http://www.example.org/rss/5423093&lt;/guid&gt;<br /> &lt;description&gt;Example of group repetition.&lt;/description&gt;<br /> &lt;pubDate&gt;June 06, 2006&lt;/pubDate&gt;<br /> &lt;/item&gt;<br /> &lt;/channel&gt;<br /> &lt;/rss&gt;</span></pre></div> <div class="textblock">The write method is called to write a template's string output to a file:</div> <div class="codeblock"><pre>&gt;&gt;&gt; example.write(<span class="string">'finalexample.rss'</span>)</pre></div> <div class="textblock">The pipe method outputs a string and resets the template back to its default state:</div> <div class="codeblock"><pre>&gt;&gt;&gt; <span class="keyword">print</span> example.pipe()<br /><span class="stdout">&lt;rss version=&quot;2.0&quot;&gt;<br /> &lt;channel&gt;<br /> &lt;title&gt;Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/&lt;/link&gt;<br /> &lt;description&gt;RSS Example&lt;/description&gt;<br /> &lt;language&gt;en-us&lt;/language&gt;<br /> &lt;pubDate&gt; , &lt;/pubDate&gt;<br /> &lt;lastBuildDate&gt; , &lt;/lastBuildDate&gt;<br /> &lt;item&gt;<br /> &lt;title&gt;Example Title: First Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/rss/5423092&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;http://www.example.org/rss/5423092&lt;/guid&gt;<br /> &lt;description&gt;Example of assigning text to a field.&lt;/description&gt;<br /> &lt;pubDate&gt;June 06, 2006&lt;/pubDate&gt;<br /> &lt;/item&gt;<br /> &lt;item&gt;<br /> &lt;title&gt;Example Title: Second Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/rss/5423093&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;http://www.example.org/rss/5423093&lt;/guid&gt;<br /> &lt;description&gt;Example of group repetition.&lt;/description&gt;<br /> &lt;pubDate&gt;June 06, 2006&lt;/pubDate&gt;<br /> &lt;/item&gt;<br /> &lt;/channel&gt;<br /> &lt;/rss&gt;</span><br />&gt;&gt;&gt; <span class="keyword">print</span> example<span class="stdout"><br />&lt;rss version=&quot;2.0&quot;&gt;<br /> &lt;channel&gt;<br /> &lt;title&gt;Example&lt;/title&gt;<br /> &lt;link&gt;http://www.example.org/&lt;/link&gt;<br /> &lt;description&gt;RSS Example&lt;/description&gt;<br /> &lt;language&gt;en-us&lt;/language&gt;<br /> &lt;pubDate&gt; , &lt;/pubDate&gt;<br /> &lt;lastBuildDate&gt; , &lt;/lastBuildDate&gt;

&lt;item&gt;<br /> &lt;title&gt;&lt;/title&gt;<br /> &lt;link&gt;&lt;/link&gt;<br /> &lt;guid isPermaLink=&quot;true&quot;&gt;&lt;/guid&gt;<br /> &lt;description&gt;&lt;/description&gt;<br /> &lt;pubDate&gt;&lt;/pubDate&gt;<br /> &lt;/item&gt;<br /> &lt;/channel&gt;<br /> &lt;/rss&gt;</span></pre></div>

<p> <a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml11" alt="Valid XHTML 1.1" height="31" width="88" /></a> </p> <div class="footer">Copyright 2007 L. C. Rees. All rights reserved.</div> </body> </html>

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.