source: exist/trunk/python/elementtree-1.3/docs/pythondoc-elementtree.ElementInclude.html @ 3150

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/exist/trunk/python/elementtree-1.3/docs/pythondoc-elementtree.ElementInclude.html@3150
Revision 3150, 2.9 KB checked in by lawrence, 12 years ago (diff)

woops, we didn't include elementtree itself.

Line 
1<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
2<html>
3<head>
4<meta http-equiv='Content-Type' content='text/html; charset=us-ascii' />
5<title>The elementtree.ElementInclude Module</title>
6<link rel='stylesheet' href='effbot.css' type='text/css' />
7</head>
8<body>
9<h1>The elementtree.ElementInclude Module</h1>
10<p>Limited XInclude support for the ElementTree package.</p>
11<h2>Module Contents</h2>
12<dl>
13<dt><a id='elementtree.ElementInclude.default_loader-function' name='elementtree.ElementInclude.default_loader-function'><b>default_loader(href, parse, encoding=None)</b></a> [<a href='#elementtree.ElementInclude.default_loader-function'>#</a>]</dt>
14<dd>
15<p>Default loader.  This loader reads an included resource from disk.</p>
16<dl>
17<dt><i>href</i></dt>
18<dd>
19Resource reference.</dd>
20<dt><i>parse</i></dt>
21<dd>
22Parse mode.  Either &quot;xml&quot; or &quot;text&quot;.</dd>
23<dt><i>encoding</i></dt>
24<dd>
25Optional text encoding.</dd>
26<dt>Returns:</dt>
27<dd>
28The expanded resource.  If the parse mode is &quot;xml&quot;, this
29   is an ElementTree instance.  If the parse mode is &quot;text&quot;, this
30   is a Unicode string.  If the loader fails, it can return None
31   or raise an IOError exception.</dd>
32<dt>Raises <b>IOError</b>:</dt><dd>
33If the loader fails to load the resource.</dd>
34</dl><br />
35</dd>
36<dt><b>FatalIncludeError</b> (class)  [<a href='#elementtree.ElementInclude.FatalIncludeError-class'>#</a>]</dt>
37<dd>
38<p>Fatal include error.</p>
39<p>For more information about this class, see <a href='#elementtree.ElementInclude.FatalIncludeError-class'><i>The FatalIncludeError Class</i></a>.</p>
40</dd>
41<dt><a id='elementtree.ElementInclude.include-function' name='elementtree.ElementInclude.include-function'><b>include(elem, loader=None)</b></a> [<a href='#elementtree.ElementInclude.include-function'>#</a>]</dt>
42<dd>
43<p>Expand XInclude directives.</p>
44<dl>
45<dt><i>elem</i></dt>
46<dd>
47Root element.</dd>
48<dt><i>loader</i></dt>
49<dd>
50Optional resource loader.  If omitted, it defaults
51    to <a class="link" href="#elementtree.ElementInclude.default_loader-function"><b>default_loader</b></a>.  If given, it should be a callable
52    that implements the same interface as <b>default_loader</b>.
53</dd>
54<dt>Raises <b>FatalIncludeError</b>:</dt><dd>
55If the function fails to include a given
56    resource, or if the tree contains malformed XInclude elements.</dd>
57<dt>Raises <b>IOError</b>:</dt><dd>
58If the function fails to load a given resource.</dd>
59</dl><br />
60</dd>
61</dl>
62<h2><a id='elementtree.ElementInclude.FatalIncludeError-class' name='elementtree.ElementInclude.FatalIncludeError-class'>The FatalIncludeError Class</a></h2>
63<dl>
64<dt><b>FatalIncludeError</b> (class)  [<a href='#elementtree.ElementInclude.FatalIncludeError-class'>#</a>]</dt>
65<dd>
66<p>Fatal include error.</p>
67</dd>
68</dl>
69</body></html>
Note: See TracBrowser for help on using the repository browser.