File: pythondoc-elementtree.TidyTools.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 (65 lines) | stat: -rw-r--r-- 2,057 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
<!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.TidyTools Module</title>
<link rel='stylesheet' href='effbot.css' type='text/css' />
</head>
<body>
<h1>The elementtree.TidyTools Module</h1>
<p>Tools to build element trees from HTML, using the external <b>tidy</b>
utility.
</p><h2>Module Contents</h2>
<dl>
<dt><a id='elementtree.TidyTools.getbody-function' name='elementtree.TidyTools.getbody-function'><b>getbody(file, **options)</b></a> [<a href='#elementtree.TidyTools.getbody-function'>#</a>]</dt>
<dd>
<p>Get document body from a an HTML or HTML-like file.  This function
uses the <b>tidy</b> function to convert HTML to XHTML, and cleans
up the resulting XML tree.

</p><dl>
<dt><i>file</i></dt>
<dd>
Filename.</dd>
<dt>Returns:</dt>
<dd>
A <b>body</b> element, or None if not successful.
</dd>
</dl><br />
</dd>
<dt><a id='elementtree.TidyTools.getzonebody-function' name='elementtree.TidyTools.getzonebody-function'><b>getzonebody(file, **options)</b></a> [<a href='#elementtree.TidyTools.getzonebody-function'>#</a>]</dt>
<dd>
<p>Same as <b>getbody</b>, but turns plain text at the start of the
document into an H1 tag.  This function can be used to parse zone
documents.

</p><dl>
<dt><i>file</i></dt>
<dd>
Filename.</dd>
<dt>Returns:</dt>
<dd>
A <b>body</b> element, or None if not successful.
</dd>
</dl><br />
</dd>
<dt><a id='elementtree.TidyTools.tidy-function' name='elementtree.TidyTools.tidy-function'><b>tidy(file, new_inline_tags=None)</b></a> [<a href='#elementtree.TidyTools.tidy-function'>#</a>]</dt>
<dd>
<p>Convert an HTML or HTML-like file to XHTML, using the <b>tidy</b>
command line utility.

</p><dl>
<dt><i>file</i></dt>
<dd>
Filename.</dd>
<dt><i>new_inline_tags</i></dt>
<dd>
An optional list of valid but non-standard
    inline tags.</dd>
<dt>Returns:</dt>
<dd>
An element tree, or None if not successful.</dd>
</dl><br />
</dd>
</dl>
</body></html>