File: pythondoc-elementtree.ElementInclude.html

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