source: exist/trunk/python/elementtree-1.3a6-20070310-badc/docs/pythondoc-elementtree.ElementC14N.html @ 3578

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/exist/trunk/python/elementtree-1.3a6-20070310-badc/docs/pythondoc-elementtree.ElementC14N.html@3578
Revision 3578, 3.3 KB checked in by pjkersha, 11 years ago (diff)

Latest releases from Fredrik Lundh. 10 March release has exclusive C14N support with namespace prefixes.

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.ElementC14N Module</title>
6<link rel='stylesheet' href='effbot.css' type='text/css' />
7</head>
8<body>
9<h1>The elementtree.ElementC14N Module</h1>
10<dl>
11<dt><a id='elementtree.ElementC14N._find_open_uris-function' name='elementtree.ElementC14N._find_open_uris-function'><b>_find_open_uris(elem, scope, parent)</b></a> [<a href='#elementtree.ElementC14N._find_open_uris-function'>#</a>]</dt>
12<dd>
13<p>(Internal) Finds undefined URI:s in a scoped tree.</p>
14</dd>
15<dt><a id='elementtree.ElementC14N._findprefix-function' name='elementtree.ElementC14N._findprefix-function'><b>_findprefix(elem, scope, parent, uri)</b></a> [<a href='#elementtree.ElementC14N._findprefix-function'>#</a>]</dt>
16<dd>
17<p>(Internal) Finds prefix for given URI in a scoped tree.</p>
18</dd>
19<dt><a id='elementtree.ElementC14N._listscopes-function' name='elementtree.ElementC14N._listscopes-function'><b>_listscopes(elem, scope, parent)</b></a> [<a href='#elementtree.ElementC14N._listscopes-function'>#</a>]</dt>
20<dd>
21<p>(Internal) Returns a sequence of (prefix, uri) pairs.</p>
22</dd>
23<dt><a id='elementtree.ElementC14N._serialize_c14n-function' name='elementtree.ElementC14N._serialize_c14n-function'><b>_serialize_c14n(write, elem, encoding, qnames, namespaces)</b></a> [<a href='#elementtree.ElementC14N._serialize_c14n-function'>#</a>]</dt>
24<dd>
25<p>(Internal) Hook used by ElementTree's c14n output method</p>
26</dd>
27<dt><a id='elementtree.ElementC14N.parse-function' name='elementtree.ElementC14N.parse-function'><b>parse(file)</b></a> [<a href='#elementtree.ElementC14N.parse-function'>#</a>]</dt>
28<dd>
29<p>Parses an XML file, and builds a tree annotated with scope and parent
30information.  To parse from a string, use the StringIO module.</p>
31<dl>
32<dt><i>file</i></dt>
33<dd>
34A file name or file object.</dd>
35<dt>Returns:</dt>
36<dd>
37An extended ElementTree, with extra scope and parent information
38   attached to the ElementTree object.</dd>
39</dl><br />
40</dd>
41<dt><a id='elementtree.ElementC14N.write-function' name='elementtree.ElementC14N.write-function'><b>write(elem, file, subset=None, **options)</b></a> [<a href='#elementtree.ElementC14N.write-function'>#</a>]</dt>
42<dd>
43<p>Writes a canonicalized document.</p>
44<dl>
45<dt><i>elem</i></dt>
46<dd>
47Element or ElementTree.  If passed a tree created by <a class="link" href="#elementtree.ElementC14N.parse-function"><b>parse</b></a>, the function attempts to preserve existing prefixes.
48    Otherwise, new prefixes are allocated.
49</dd>
50<dt><i>file</i></dt>
51<dd>
52Output file.  Can be either a filename or a file-like object.</dd>
53<dt><i>subset</i></dt>
54<dd>
55Subset element, if applicable.</dd>
56<dt><i>**options</i></dt>
57<dd>
58Options, given as keyword arguments.</dd>
59<dt><i>exclusive=</i></dt>
60<dd>
61Use exclusive C14N.  In this mode, namespaces
62    declarations are moved to the first element (in document order)
63    that actually uses the namespace.</dd>
64<dt><i>inclusive_namespaces=</i></dt>
65<dd>
66If given, a list or set of prefxies
67    that should be retained in the serialized document, even if
68    they're not used.  This applies to exclusive serialization only
69    (for inclusive subsets, all prefixes are always included).</dd>
70</dl><br />
71</dd>
72</dl>
73</body></html>
Note: See TracBrowser for help on using the repository browser.