1 <?xml version="1.0" encoding="ascii"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3 "DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6 <title>lxml.tests.test_etree</title>
7 <link rel="stylesheet" href="epydoc.css" type="text/css" />
8 <script type="text/javascript" src="epydoc.js"></script>
11 <body bgcolor="white" text="black" link="blue" vlink="#204080"
13 <!-- ==================== NAVIGATION BAR ==================== -->
14 <table class="navbar" border="0" width="100%" cellpadding="0"
15 bgcolor="#a0c0ff" cellspacing="0">
18 <th> <a
19 href="lxml-module.html">Home</a> </th>
22 <th> <a
23 href="module-tree.html">Trees</a> </th>
26 <th> <a
27 href="identifier-index.html">Indices</a> </th>
30 <th> <a
31 href="help.html">Help</a> </th>
33 <!-- Project homepage -->
34 <th class="navbar" align="right" width="100%">
35 <table border="0" cellpadding="0" cellspacing="0">
36 <tr><th class="navbar" align="center"
37 ><a class="navbar" target="_top" href="/">lxml API</a></th>
41 <table width="100%" cellpadding="0" cellspacing="0">
44 <span class="breadcrumbs">
45 <a href="lxml-module.html">Package lxml</a> ::
46 <a href="lxml.tests-module.html">Package tests</a> ::
47 Module test_etree
51 <table cellpadding="0" cellspacing="0">
52 <!-- hide/show private -->
53 <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
54 onclick="toggle_private();">hide private</a>]</span></td></tr>
55 <tr><td align="right"><span class="options"
56 >[<a href="frames.html" target="_top">frames</a
57 >] | <a href="lxml.tests.test_etree-pysrc.html"
58 target="_top">no frames</a>]</span></td></tr>
63 <h1 class="epydoc">Source Code for <a href="lxml.tests.test_etree-module.html">Module lxml.tests.test_etree</a></h1>
65 <a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
66 <a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"> </tt>
67 <a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
68 <a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-docstring">Tests specific to the extended etree API</tt> </tt>
69 <a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
70 <a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-docstring">Tests that apply to the general ElementTree API should go into</tt> </tt>
71 <a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring">test_elementtree</tt> </tt>
72 <a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
73 <a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"> </tt>
74 <a name="L10"></a><tt class="py-lineno"> 10</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-0" class="py-name" targets="Variable lxml.etree.XPath.path=lxml.etree.XPath-class.html#path"><a title="lxml.etree.XPath.path" class="py-name" href="#" onclick="return doclink('link-0', 'path', 'link-0');">path</a></tt> </tt>
75 <a name="L11"></a><tt class="py-lineno"> 11</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">unittest</tt> </tt>
76 <a name="L12"></a><tt class="py-lineno"> 12</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Method lxml.etree.PyErrorLog.copy()=lxml.etree.PyErrorLog-class.html#copy,Method lxml.etree._BaseErrorLog.copy()=lxml.etree._BaseErrorLog-class.html#copy,Method lxml.etree._BaseParser.copy()=lxml.etree._BaseParser-class.html#copy,Method lxml.etree._ErrorLog.copy()=lxml.etree._ErrorLog-class.html#copy,Method lxml.etree._IDDict.copy()=lxml.etree._IDDict-class.html#copy,Method lxml.etree._ListErrorLog.copy()=lxml.etree._ListErrorLog-class.html#copy,Method lxml.etree._ResolverRegistry.copy()=lxml.etree._ResolverRegistry-class.html#copy,Method lxml.etree.iterparse.copy()=lxml.etree.iterparse-class.html#copy"><a title="lxml.etree.PyErrorLog.copy
77 lxml.etree._BaseErrorLog.copy
78 lxml.etree._BaseParser.copy
79 lxml.etree._ErrorLog.copy
80 lxml.etree._IDDict.copy
81 lxml.etree._ListErrorLog.copy
82 lxml.etree._ResolverRegistry.copy
83 lxml.etree.iterparse.copy" class="py-name" href="#" onclick="return doclink('link-1', 'copy', 'link-1');">copy</a></tt> </tt>
84 <a name="L13"></a><tt class="py-lineno"> 13</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
85 <a name="L14"></a><tt class="py-lineno"> 14</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
86 <a name="L15"></a><tt class="py-lineno"> 15</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">operator</tt> </tt>
87 <a name="L16"></a><tt class="py-lineno"> 16</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">tempfile</tt> </tt>
88 <a name="L17"></a><tt class="py-lineno"> 17</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">gzip</tt> </tt>
89 <a name="L18"></a><tt class="py-lineno"> 18</tt> <tt class="py-line"> </tt>
90 <a name="L19"></a><tt class="py-lineno"> 19</tt> <tt class="py-line"><tt id="link-2" class="py-name" targets="Variable lxml.tests.test_classlookup.this_dir=lxml.tests.test_classlookup-module.html#this_dir,Variable lxml.tests.test_dtd.this_dir=lxml.tests.test_dtd-module.html#this_dir,Variable lxml.tests.test_elementtree.this_dir=lxml.tests.test_elementtree-module.html#this_dir,Variable lxml.tests.test_errors.this_dir=lxml.tests.test_errors-module.html#this_dir,Variable lxml.tests.test_etree.this_dir=lxml.tests.test_etree-module.html#this_dir,Variable lxml.tests.test_htmlparser.this_dir=lxml.tests.test_htmlparser-module.html#this_dir,Variable lxml.tests.test_io.this_dir=lxml.tests.test_io-module.html#this_dir,Variable lxml.tests.test_isoschematron.this_dir=lxml.tests.test_isoschematron-module.html#this_dir,Variable lxml.tests.test_nsclasses.this_dir=lxml.tests.test_nsclasses-module.html#this_dir,Variable lxml.tests.test_objectify.this_dir=lxml.tests.test_objectify-module.html#this_dir,Variable lxml.tests.test_pyclasslookup.this_dir=lxml.tests.test_pyclasslookup-module.html#this_dir,Variable lxml.tests.test_relaxng.this_dir=lxml.tests.test_relaxng-module.html#this_dir,Variable lxml.tests.test_sax.this_dir=lxml.tests.test_sax-module.html#this_dir,Variable lxml.tests.test_schematron.this_dir=lxml.tests.test_schematron-module.html#this_dir,Variable lxml.tests.test_threading.this_dir=lxml.tests.test_threading-module.html#this_dir,Variable lxml.tests.test_unicode.this_dir=lxml.tests.test_unicode-module.html#this_dir,Variable lxml.tests.test_xmlschema.this_dir=lxml.tests.test_xmlschema-module.html#this_dir,Variable lxml.tests.test_xpathevaluator.this_dir=lxml.tests.test_xpathevaluator-module.html#this_dir,Variable lxml.tests.test_xslt.this_dir=lxml.tests.test_xslt-module.html#this_dir"><a title="lxml.tests.test_classlookup.this_dir
91 lxml.tests.test_dtd.this_dir
92 lxml.tests.test_elementtree.this_dir
93 lxml.tests.test_errors.this_dir
94 lxml.tests.test_etree.this_dir
95 lxml.tests.test_htmlparser.this_dir
96 lxml.tests.test_io.this_dir
97 lxml.tests.test_isoschematron.this_dir
98 lxml.tests.test_nsclasses.this_dir
99 lxml.tests.test_objectify.this_dir
100 lxml.tests.test_pyclasslookup.this_dir
101 lxml.tests.test_relaxng.this_dir
102 lxml.tests.test_sax.this_dir
103 lxml.tests.test_schematron.this_dir
104 lxml.tests.test_threading.this_dir
105 lxml.tests.test_unicode.this_dir
106 lxml.tests.test_xmlschema.this_dir
107 lxml.tests.test_xpathevaluator.this_dir
108 lxml.tests.test_xslt.this_dir" class="py-name" href="#" onclick="return doclink('link-2', 'this_dir', 'link-2');">this_dir</a></tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-3" class="py-name"><a title="lxml.etree.XPath.path" class="py-name" href="#" onclick="return doclink('link-3', 'path', 'link-0');">path</a></tt><tt class="py-op">.</tt><tt class="py-name">dirname</tt><tt class="py-op">(</tt><tt class="py-name">__file__</tt><tt class="py-op">)</tt> </tt>
109 <a name="L20"></a><tt class="py-lineno"> 20</tt> <tt class="py-line"><tt class="py-keyword">if</tt> <tt id="link-4" class="py-name"><a title="lxml.tests.test_classlookup.this_dir
110 lxml.tests.test_dtd.this_dir
111 lxml.tests.test_elementtree.this_dir
112 lxml.tests.test_errors.this_dir
113 lxml.tests.test_etree.this_dir
114 lxml.tests.test_htmlparser.this_dir
115 lxml.tests.test_io.this_dir
116 lxml.tests.test_isoschematron.this_dir
117 lxml.tests.test_nsclasses.this_dir
118 lxml.tests.test_objectify.this_dir
119 lxml.tests.test_pyclasslookup.this_dir
120 lxml.tests.test_relaxng.this_dir
121 lxml.tests.test_sax.this_dir
122 lxml.tests.test_schematron.this_dir
123 lxml.tests.test_threading.this_dir
124 lxml.tests.test_unicode.this_dir
125 lxml.tests.test_xmlschema.this_dir
126 lxml.tests.test_xpathevaluator.this_dir
127 lxml.tests.test_xslt.this_dir" class="py-name" href="#" onclick="return doclink('link-4', 'this_dir', 'link-2');">this_dir</a></tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt id="link-5" class="py-name"><a title="lxml.etree.XPath.path" class="py-name" href="#" onclick="return doclink('link-5', 'path', 'link-0');">path</a></tt><tt class="py-op">:</tt> </tt>
128 <a name="L21"></a><tt class="py-lineno"> 21</tt> <tt class="py-line"> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name"><a title="lxml.etree.XPath.path" class="py-name" href="#" onclick="return doclink('link-6', 'path', 'link-0');">path</a></tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Method lxml.etree._Element.insert()=lxml.etree._Element-class.html#insert,Method lxml.etree.__ContentOnlyElement.insert()=lxml.etree.__ContentOnlyElement-class.html#insert"><a title="lxml.etree._Element.insert
129 lxml.etree.__ContentOnlyElement.insert" class="py-name" href="#" onclick="return doclink('link-7', 'insert', 'link-7');">insert</a></tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt id="link-8" class="py-name"><a title="lxml.tests.test_classlookup.this_dir
130 lxml.tests.test_dtd.this_dir
131 lxml.tests.test_elementtree.this_dir
132 lxml.tests.test_errors.this_dir
133 lxml.tests.test_etree.this_dir
134 lxml.tests.test_htmlparser.this_dir
135 lxml.tests.test_io.this_dir
136 lxml.tests.test_isoschematron.this_dir
137 lxml.tests.test_nsclasses.this_dir
138 lxml.tests.test_objectify.this_dir
139 lxml.tests.test_pyclasslookup.this_dir
140 lxml.tests.test_relaxng.this_dir
141 lxml.tests.test_sax.this_dir
142 lxml.tests.test_schematron.this_dir
143 lxml.tests.test_threading.this_dir
144 lxml.tests.test_unicode.this_dir
145 lxml.tests.test_xmlschema.this_dir
146 lxml.tests.test_xpathevaluator.this_dir
147 lxml.tests.test_xslt.this_dir" class="py-name" href="#" onclick="return doclink('link-8', 'this_dir', 'link-2');">this_dir</a></tt><tt class="py-op">)</tt> <tt class="py-comment"># needed for Py3</tt> </tt>
148 <a name="L22"></a><tt class="py-lineno"> 22</tt> <tt class="py-line"> </tt>
149 <a name="L23"></a><tt class="py-lineno"> 23</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-9" class="py-name" targets="Module lxml.tests.common_imports=lxml.tests.common_imports-module.html"><a title="lxml.tests.common_imports" class="py-name" href="#" onclick="return doclink('link-9', 'common_imports', 'link-9');">common_imports</a></tt> <tt class="py-keyword">import</tt> <tt id="link-10" class="py-name" targets="Module lxml.etree=lxml.etree-module.html,Variable lxml.sax.ElementTreeContentHandler.etree=lxml.sax.ElementTreeContentHandler-class.html#etree,Variable lxml.tests.test_elementtree.CElementTreeTestCase.etree=lxml.tests.test_elementtree.CElementTreeTestCase-class.html#etree,Variable lxml.tests.test_elementtree.ETreeTestCaseBase.etree=lxml.tests.test_elementtree.ETreeTestCaseBase-class.html#etree,Variable lxml.tests.test_io.IOTestCaseBase.etree=lxml.tests.test_io.IOTestCaseBase-class.html#etree"><a title="lxml.etree
150 lxml.sax.ElementTreeContentHandler.etree
151 lxml.tests.test_elementtree.CElementTreeTestCase.etree
152 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
153 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-10', 'etree', 'link-10');">etree</a></tt><tt class="py-op">,</tt> <tt class="py-name">StringIO</tt><tt class="py-op">,</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">,</tt> <tt id="link-11" class="py-name" targets="Class lxml.tests.common_imports.HelperTestCase=lxml.tests.common_imports.HelperTestCase-class.html"><a title="lxml.tests.common_imports.HelperTestCase" class="py-name" href="#" onclick="return doclink('link-11', 'HelperTestCase', 'link-11');">HelperTestCase</a></tt><tt class="py-op">,</tt> <tt id="link-12" class="py-name" targets="Function lxml.tests.common_imports.fileInTestDir()=lxml.tests.common_imports-module.html#fileInTestDir"><a title="lxml.tests.common_imports.fileInTestDir" class="py-name" href="#" onclick="return doclink('link-12', 'fileInTestDir', 'link-12');">fileInTestDir</a></tt><tt class="py-op">,</tt> <tt id="link-13" class="py-name" targets="Function lxml.tests.common_imports.read_file()=lxml.tests.common_imports-module.html#read_file"><a title="lxml.tests.common_imports.read_file" class="py-name" href="#" onclick="return doclink('link-13', 'read_file', 'link-13');">read_file</a></tt> </tt>
154 <a name="L24"></a><tt class="py-lineno"> 24</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-14" class="py-name"><a title="lxml.tests.common_imports" class="py-name" href="#" onclick="return doclink('link-14', 'common_imports', 'link-9');">common_imports</a></tt> <tt class="py-keyword">import</tt> <tt id="link-15" class="py-name" targets="Class lxml.tests.common_imports.SillyFileLike=lxml.tests.common_imports.SillyFileLike-class.html"><a title="lxml.tests.common_imports.SillyFileLike" class="py-name" href="#" onclick="return doclink('link-15', 'SillyFileLike', 'link-15');">SillyFileLike</a></tt><tt class="py-op">,</tt> <tt id="link-16" class="py-name" targets="Class lxml.tests.common_imports.LargeFileLikeUnicode=lxml.tests.common_imports.LargeFileLikeUnicode-class.html"><a title="lxml.tests.common_imports.LargeFileLikeUnicode" class="py-name" href="#" onclick="return doclink('link-16', 'LargeFileLikeUnicode', 'link-16');">LargeFileLikeUnicode</a></tt><tt class="py-op">,</tt> <tt class="py-name">doctest</tt><tt class="py-op">,</tt> <tt id="link-17" class="py-name" targets="Function lxml.tests.common_imports.make_doctest()=lxml.tests.common_imports-module.html#make_doctest"><a title="lxml.tests.common_imports.make_doctest" class="py-name" href="#" onclick="return doclink('link-17', 'make_doctest', 'link-17');">make_doctest</a></tt> </tt>
155 <a name="L25"></a><tt class="py-lineno"> 25</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-18" class="py-name"><a title="lxml.tests.common_imports" class="py-name" href="#" onclick="return doclink('link-18', 'common_imports', 'link-9');">common_imports</a></tt> <tt class="py-keyword">import</tt> <tt id="link-19" class="py-name" targets="Function lxml.tests.common_imports.canonicalize()=lxml.tests.common_imports-module.html#canonicalize"><a title="lxml.tests.common_imports.canonicalize" class="py-name" href="#" onclick="return doclink('link-19', 'canonicalize', 'link-19');">canonicalize</a></tt><tt class="py-op">,</tt> <tt class="py-name">sorted</tt><tt class="py-op">,</tt> <tt id="link-20" class="py-name" targets="Function lxml.tests.common_imports._str()=lxml.tests.common_imports-module.html#_str"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-20', '_str', 'link-20');">_str</a></tt><tt class="py-op">,</tt> <tt id="link-21" class="py-name" targets="Function lxml.tests.common_imports._bytes()=lxml.tests.common_imports-module.html#_bytes"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-21', '_bytes', 'link-21');">_bytes</a></tt> </tt>
156 <a name="L26"></a><tt class="py-lineno"> 26</tt> <tt class="py-line"> </tt>
157 <a name="L27"></a><tt class="py-lineno"> 27</tt> <tt class="py-line"><tt class="py-keyword">print</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">)</tt> </tt>
158 <a name="L28"></a><tt class="py-lineno"> 28</tt> <tt class="py-line"><tt class="py-keyword">print</tt><tt class="py-op">(</tt><tt class="py-string">"TESTED VERSION: %s"</tt> <tt class="py-op">%</tt> <tt id="link-22" class="py-name"><a title="lxml.etree
159 lxml.sax.ElementTreeContentHandler.etree
160 lxml.tests.test_elementtree.CElementTreeTestCase.etree
161 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
162 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-22', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt class="py-name">__version__</tt><tt class="py-op">)</tt> </tt>
163 <a name="L29"></a><tt class="py-lineno"> 29</tt> <tt class="py-line"><tt class="py-keyword">print</tt><tt class="py-op">(</tt><tt class="py-string">" Python: "</tt> <tt class="py-op">+</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">version_info</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
164 <a name="L30"></a><tt class="py-lineno"> 30</tt> <tt class="py-line"><tt class="py-keyword">print</tt><tt class="py-op">(</tt><tt class="py-string">" lxml.etree: "</tt> <tt class="py-op">+</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt id="link-23" class="py-name"><a title="lxml.etree
165 lxml.sax.ElementTreeContentHandler.etree
166 lxml.tests.test_elementtree.CElementTreeTestCase.etree
167 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
168 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-23', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-24" class="py-name" targets="Variable lxml.etree.LXML_VERSION=lxml.etree-module.html#LXML_VERSION"><a title="lxml.etree.LXML_VERSION" class="py-name" href="#" onclick="return doclink('link-24', 'LXML_VERSION', 'link-24');">LXML_VERSION</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
169 <a name="L31"></a><tt class="py-lineno"> 31</tt> <tt class="py-line"><tt class="py-keyword">print</tt><tt class="py-op">(</tt><tt class="py-string">" libxml used: "</tt> <tt class="py-op">+</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt id="link-25" class="py-name"><a title="lxml.etree
170 lxml.sax.ElementTreeContentHandler.etree
171 lxml.tests.test_elementtree.CElementTreeTestCase.etree
172 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
173 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-25', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-26" class="py-name" targets="Variable lxml.etree.LIBXML_VERSION=lxml.etree-module.html#LIBXML_VERSION"><a title="lxml.etree.LIBXML_VERSION" class="py-name" href="#" onclick="return doclink('link-26', 'LIBXML_VERSION', 'link-26');">LIBXML_VERSION</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
174 <a name="L32"></a><tt class="py-lineno"> 32</tt> <tt class="py-line"><tt class="py-keyword">print</tt><tt class="py-op">(</tt><tt class="py-string">" libxml compiled: "</tt> <tt class="py-op">+</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt id="link-27" class="py-name"><a title="lxml.etree
175 lxml.sax.ElementTreeContentHandler.etree
176 lxml.tests.test_elementtree.CElementTreeTestCase.etree
177 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
178 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-27', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-28" class="py-name" targets="Variable lxml.etree.LIBXML_COMPILED_VERSION=lxml.etree-module.html#LIBXML_COMPILED_VERSION"><a title="lxml.etree.LIBXML_COMPILED_VERSION" class="py-name" href="#" onclick="return doclink('link-28', 'LIBXML_COMPILED_VERSION', 'link-28');">LIBXML_COMPILED_VERSION</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
179 <a name="L33"></a><tt class="py-lineno"> 33</tt> <tt class="py-line"><tt class="py-keyword">print</tt><tt class="py-op">(</tt><tt class="py-string">" libxslt used: "</tt> <tt class="py-op">+</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt id="link-29" class="py-name"><a title="lxml.etree
180 lxml.sax.ElementTreeContentHandler.etree
181 lxml.tests.test_elementtree.CElementTreeTestCase.etree
182 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
183 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-29', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-30" class="py-name" targets="Variable lxml.etree.LIBXSLT_VERSION=lxml.etree-module.html#LIBXSLT_VERSION"><a title="lxml.etree.LIBXSLT_VERSION" class="py-name" href="#" onclick="return doclink('link-30', 'LIBXSLT_VERSION', 'link-30');">LIBXSLT_VERSION</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
184 <a name="L34"></a><tt class="py-lineno"> 34</tt> <tt class="py-line"><tt class="py-keyword">print</tt><tt class="py-op">(</tt><tt class="py-string">" libxslt compiled: "</tt> <tt class="py-op">+</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt id="link-31" class="py-name"><a title="lxml.etree
185 lxml.sax.ElementTreeContentHandler.etree
186 lxml.tests.test_elementtree.CElementTreeTestCase.etree
187 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
188 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-31', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-32" class="py-name" targets="Variable lxml.etree.LIBXSLT_COMPILED_VERSION=lxml.etree-module.html#LIBXSLT_COMPILED_VERSION"><a title="lxml.etree.LIBXSLT_COMPILED_VERSION" class="py-name" href="#" onclick="return doclink('link-32', 'LIBXSLT_COMPILED_VERSION', 'link-32');">LIBXSLT_COMPILED_VERSION</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
189 <a name="L35"></a><tt class="py-lineno"> 35</tt> <tt class="py-line"><tt class="py-keyword">print</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">)</tt> </tt>
190 <a name="L36"></a><tt class="py-lineno"> 36</tt> <tt class="py-line"> </tt>
191 <a name="L37"></a><tt class="py-lineno"> 37</tt> <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
192 <a name="L38"></a><tt class="py-lineno"> 38</tt> <tt class="py-line"> <tt class="py-name">_unicode</tt> <tt class="py-op">=</tt> <tt class="py-name">unicode</tt> </tt>
193 <a name="L39"></a><tt class="py-lineno"> 39</tt> <tt class="py-line"><tt class="py-keyword">except</tt> <tt class="py-name">NameError</tt><tt class="py-op">:</tt> </tt>
194 <a name="L40"></a><tt class="py-lineno"> 40</tt> <tt class="py-line"> <tt class="py-comment"># Python 3</tt> </tt>
195 <a name="L41"></a><tt class="py-lineno"> 41</tt> <tt class="py-line"> <tt class="py-name">_unicode</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt> </tt>
196 <a name="L42"></a><tt class="py-lineno"> 42</tt> <tt class="py-line"> </tt>
197 <a name="ETreeOnlyTestCase"></a><div id="ETreeOnlyTestCase-def"><a name="L43"></a><tt class="py-lineno"> 43</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase-toggle" onclick="return toggle('ETreeOnlyTestCase');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html">ETreeOnlyTestCase</a><tt class="py-op">(</tt><tt class="py-base-class">HelperTestCase</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
198 </div><div id="ETreeOnlyTestCase-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="ETreeOnlyTestCase-expanded"><a name="L44"></a><tt class="py-lineno"> 44</tt> <tt class="py-line"> <tt class="py-docstring">"""Tests only for etree, not ElementTree"""</tt> </tt>
199 <a name="L45"></a><tt class="py-lineno"> 45</tt> <tt class="py-line"> <tt id="link-33" class="py-name"><a title="lxml.etree
200 lxml.sax.ElementTreeContentHandler.etree
201 lxml.tests.test_elementtree.CElementTreeTestCase.etree
202 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
203 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-33', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt id="link-34" class="py-name"><a title="lxml.etree
204 lxml.sax.ElementTreeContentHandler.etree
205 lxml.tests.test_elementtree.CElementTreeTestCase.etree
206 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
207 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-34', 'etree', 'link-10');">etree</a></tt> </tt>
208 <a name="L46"></a><tt class="py-lineno"> 46</tt> <tt class="py-line"> </tt>
209 <a name="ETreeOnlyTestCase.test_version"></a><div id="ETreeOnlyTestCase.test_version-def"><a name="L47"></a><tt class="py-lineno"> 47</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_version-toggle" onclick="return toggle('ETreeOnlyTestCase.test_version');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_version">test_version</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
210 </div><div id="ETreeOnlyTestCase.test_version-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_version-expanded"><a name="L48"></a><tt class="py-lineno"> 48</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name" targets="Method lxml.etree._Validator.assert_()=lxml.etree._Validator-class.html#assert_"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-35', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-36" class="py-name"><a title="lxml.etree
211 lxml.sax.ElementTreeContentHandler.etree
212 lxml.tests.test_elementtree.CElementTreeTestCase.etree
213 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
214 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-36', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt class="py-name">__version__</tt><tt class="py-op">,</tt> <tt class="py-name">_unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
215 <a name="L49"></a><tt class="py-lineno"> 49</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-37" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-37', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-38" class="py-name"><a title="lxml.etree
216 lxml.sax.ElementTreeContentHandler.etree
217 lxml.tests.test_elementtree.CElementTreeTestCase.etree
218 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
219 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-38', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-39" class="py-name"><a title="lxml.etree.LXML_VERSION" class="py-name" href="#" onclick="return doclink('link-39', 'LXML_VERSION', 'link-24');">LXML_VERSION</a></tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
220 <a name="L50"></a><tt class="py-lineno"> 50</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEqual</tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt id="link-40" class="py-name"><a title="lxml.etree
221 lxml.sax.ElementTreeContentHandler.etree
222 lxml.tests.test_elementtree.CElementTreeTestCase.etree
223 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
224 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-40', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-41" class="py-name"><a title="lxml.etree.LXML_VERSION" class="py-name" href="#" onclick="return doclink('link-41', 'LXML_VERSION', 'link-24');">LXML_VERSION</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-number">4</tt><tt class="py-op">)</tt> </tt>
225 <a name="L51"></a><tt class="py-lineno"> 51</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-42" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-42', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-43" class="py-name"><a title="lxml.etree
226 lxml.sax.ElementTreeContentHandler.etree
227 lxml.tests.test_elementtree.CElementTreeTestCase.etree
228 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
229 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-43', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-44" class="py-name"><a title="lxml.etree.LXML_VERSION" class="py-name" href="#" onclick="return doclink('link-44', 'LXML_VERSION', 'link-24');">LXML_VERSION</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">int</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
230 <a name="L52"></a><tt class="py-lineno"> 52</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-45" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-45', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-46" class="py-name"><a title="lxml.etree
231 lxml.sax.ElementTreeContentHandler.etree
232 lxml.tests.test_elementtree.CElementTreeTestCase.etree
233 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
234 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-46', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-47" class="py-name"><a title="lxml.etree.LXML_VERSION" class="py-name" href="#" onclick="return doclink('link-47', 'LXML_VERSION', 'link-24');">LXML_VERSION</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">int</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
235 <a name="L53"></a><tt class="py-lineno"> 53</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-48" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-48', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-49" class="py-name"><a title="lxml.etree
236 lxml.sax.ElementTreeContentHandler.etree
237 lxml.tests.test_elementtree.CElementTreeTestCase.etree
238 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
239 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-49', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-50" class="py-name"><a title="lxml.etree.LXML_VERSION" class="py-name" href="#" onclick="return doclink('link-50', 'LXML_VERSION', 'link-24');">LXML_VERSION</a></tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">int</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
240 <a name="L54"></a><tt class="py-lineno"> 54</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-51" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-51', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-52" class="py-name"><a title="lxml.etree
241 lxml.sax.ElementTreeContentHandler.etree
242 lxml.tests.test_elementtree.CElementTreeTestCase.etree
243 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
244 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-52', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-53" class="py-name"><a title="lxml.etree.LXML_VERSION" class="py-name" href="#" onclick="return doclink('link-53', 'LXML_VERSION', 'link-24');">LXML_VERSION</a></tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">int</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
245 <a name="L55"></a><tt class="py-lineno"> 55</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-54" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-54', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt id="link-55" class="py-name"><a title="lxml.etree
246 lxml.sax.ElementTreeContentHandler.etree
247 lxml.tests.test_elementtree.CElementTreeTestCase.etree
248 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
249 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-55', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt class="py-name">__version__</tt><tt class="py-op">.</tt><tt class="py-name">startswith</tt><tt class="py-op">(</tt> </tt>
250 <a name="L56"></a><tt class="py-lineno"> 56</tt> <tt class="py-line"> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-56" class="py-name"><a title="lxml.etree
251 lxml.sax.ElementTreeContentHandler.etree
252 lxml.tests.test_elementtree.CElementTreeTestCase.etree
253 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
254 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-56', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-57" class="py-name"><a title="lxml.etree.LXML_VERSION" class="py-name" href="#" onclick="return doclink('link-57', 'LXML_VERSION', 'link-24');">LXML_VERSION</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
255 </div><a name="L57"></a><tt class="py-lineno"> 57</tt> <tt class="py-line"> </tt>
256 <a name="ETreeOnlyTestCase.test_c_api"></a><div id="ETreeOnlyTestCase.test_c_api-def"><a name="L58"></a><tt class="py-lineno"> 58</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_c_api-toggle" onclick="return toggle('ETreeOnlyTestCase.test_c_api');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_c_api">test_c_api</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
257 </div><div id="ETreeOnlyTestCase.test_c_api-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_c_api-expanded"><a name="L59"></a><tt class="py-lineno"> 59</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-58" class="py-name" targets="Method lxml.objectify.ObjectPath.hasattr()=lxml.objectify.ObjectPath-class.html#hasattr"><a title="lxml.objectify.ObjectPath.hasattr" class="py-name" href="#" onclick="return doclink('link-58', 'hasattr', 'link-58');">hasattr</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-59" class="py-name"><a title="lxml.etree
258 lxml.sax.ElementTreeContentHandler.etree
259 lxml.tests.test_elementtree.CElementTreeTestCase.etree
260 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
261 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-59', 'etree', 'link-10');">etree</a></tt><tt class="py-op">,</tt> <tt class="py-string">'__pyx_capi__'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
262 <a name="L60"></a><tt class="py-lineno"> 60</tt> <tt class="py-line"> <tt class="py-comment"># newer Pyrex compatible C-API</tt> </tt>
263 <a name="L61"></a><tt class="py-lineno"> 61</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-60" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-60', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-61" class="py-name"><a title="lxml.etree
264 lxml.sax.ElementTreeContentHandler.etree
265 lxml.tests.test_elementtree.CElementTreeTestCase.etree
266 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
267 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-61', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-62" class="py-name" targets="Variable lxml.etree.__pyx_capi__=lxml.etree-module.html#__pyx_capi__"><a title="lxml.etree.__pyx_capi__" class="py-name" href="#" onclick="return doclink('link-62', '__pyx_capi__', 'link-62');">__pyx_capi__</a></tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
268 <a name="L62"></a><tt class="py-lineno"> 62</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-63" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-63', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-64" class="py-name"><a title="lxml.etree
269 lxml.sax.ElementTreeContentHandler.etree
270 lxml.tests.test_elementtree.CElementTreeTestCase.etree
271 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
272 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-64', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-65" class="py-name"><a title="lxml.etree.__pyx_capi__" class="py-name" href="#" onclick="return doclink('link-65', '__pyx_capi__', 'link-62');">__pyx_capi__</a></tt><tt class="py-op">)</tt> <tt class="py-op">></tt> <tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
273 <a name="L63"></a><tt class="py-lineno"> 63</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
274 <a name="L64"></a><tt class="py-lineno"> 64</tt> <tt class="py-line"> <tt class="py-comment"># older C-API mechanism</tt> </tt>
275 <a name="L65"></a><tt class="py-lineno"> 65</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-66" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-66', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt id="link-67" class="py-name"><a title="lxml.objectify.ObjectPath.hasattr" class="py-name" href="#" onclick="return doclink('link-67', 'hasattr', 'link-58');">hasattr</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-68" class="py-name"><a title="lxml.etree
276 lxml.sax.ElementTreeContentHandler.etree
277 lxml.tests.test_elementtree.CElementTreeTestCase.etree
278 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
279 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-68', 'etree', 'link-10');">etree</a></tt><tt class="py-op">,</tt> <tt class="py-string">'_import_c_api'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
280 </div><a name="L66"></a><tt class="py-lineno"> 66</tt> <tt class="py-line"> </tt>
281 <a name="ETreeOnlyTestCase.test_element_names"></a><div id="ETreeOnlyTestCase.test_element_names-def"><a name="L67"></a><tt class="py-lineno"> 67</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_element_names-toggle" onclick="return toggle('ETreeOnlyTestCase.test_element_names');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_element_names">test_element_names</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
282 </div><div id="ETreeOnlyTestCase.test_element_names-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_element_names-expanded"><a name="L68"></a><tt class="py-lineno"> 68</tt> <tt class="py-line"> <tt id="link-69" class="py-name" targets="Class lxml.cssselect.Element=lxml.cssselect.Element-class.html,Function lxml.etree.Element()=lxml.etree-module.html#Element,Function lxml.html.Element()=lxml.html-module.html#Element,Function lxml.objectify.Element()=lxml.objectify-module.html#Element,Method lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element()=lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#Element,Class xml.etree.ElementTree.Element=xml.etree.ElementTree.Element-class.html"><a title="lxml.cssselect.Element
285 lxml.objectify.Element
286 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
287 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-69', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-70" class="py-name"><a title="lxml.etree
288 lxml.sax.ElementTreeContentHandler.etree
289 lxml.tests.test_elementtree.CElementTreeTestCase.etree
290 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
291 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-70', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-71" class="py-name"><a title="lxml.cssselect.Element
294 lxml.objectify.Element
295 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
296 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-71', 'Element', 'link-69');">Element</a></tt> </tt>
297 <a name="L69"></a><tt class="py-lineno"> 69</tt> <tt class="py-line"> <tt class="py-name">el</tt> <tt class="py-op">=</tt> <tt id="link-72" class="py-name"><a title="lxml.cssselect.Element
300 lxml.objectify.Element
301 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
302 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-72', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'name'</tt><tt class="py-op">)</tt> </tt>
303 <a name="L70"></a><tt class="py-lineno"> 70</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-73" class="py-name" targets="Variable lxml.etree._Comment.tag=lxml.etree._Comment-class.html#tag,Variable lxml.etree._Element.tag=lxml.etree._Element-class.html#tag,Variable lxml.etree._Entity.tag=lxml.etree._Entity-class.html#tag,Variable lxml.etree._ProcessingInstruction.tag=lxml.etree._ProcessingInstruction-class.html#tag,Variable lxml.etree._ReadOnlyProxy.tag=lxml.etree._ReadOnlyProxy-class.html#tag,Function lxml.tests.test_xpathevaluator.tag()=lxml.tests.test_xpathevaluator-module.html#tag,Variable xml.etree.ElementTree.Element.tag=xml.etree.ElementTree.Element-class.html#tag"><a title="lxml.etree._Comment.tag
304 lxml.etree._Element.tag
305 lxml.etree._Entity.tag
306 lxml.etree._ProcessingInstruction.tag
307 lxml.etree._ReadOnlyProxy.tag
308 lxml.tests.test_xpathevaluator.tag
309 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-73', 'tag', 'link-73');">tag</a></tt><tt class="py-op">,</tt> <tt class="py-string">'name'</tt><tt class="py-op">)</tt> </tt>
310 <a name="L71"></a><tt class="py-lineno"> 71</tt> <tt class="py-line"> <tt class="py-name">el</tt> <tt class="py-op">=</tt> <tt id="link-74" class="py-name"><a title="lxml.cssselect.Element
313 lxml.objectify.Element
314 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
315 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-74', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'{}name'</tt><tt class="py-op">)</tt> </tt>
316 <a name="L72"></a><tt class="py-lineno"> 72</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-75" class="py-name"><a title="lxml.etree._Comment.tag
317 lxml.etree._Element.tag
318 lxml.etree._Entity.tag
319 lxml.etree._ProcessingInstruction.tag
320 lxml.etree._ReadOnlyProxy.tag
321 lxml.tests.test_xpathevaluator.tag
322 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-75', 'tag', 'link-73');">tag</a></tt><tt class="py-op">,</tt> <tt class="py-string">'name'</tt><tt class="py-op">)</tt> </tt>
323 </div><a name="L73"></a><tt class="py-lineno"> 73</tt> <tt class="py-line"> </tt>
324 <a name="ETreeOnlyTestCase.test_element_name_empty"></a><div id="ETreeOnlyTestCase.test_element_name_empty-def"><a name="L74"></a><tt class="py-lineno"> 74</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_element_name_empty-toggle" onclick="return toggle('ETreeOnlyTestCase.test_element_name_empty');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_element_name_empty">test_element_name_empty</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
325 </div><div id="ETreeOnlyTestCase.test_element_name_empty-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_element_name_empty-expanded"><a name="L75"></a><tt class="py-lineno"> 75</tt> <tt class="py-line"> <tt id="link-76" class="py-name"><a title="lxml.cssselect.Element
328 lxml.objectify.Element
329 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
330 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-76', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-77" class="py-name"><a title="lxml.etree
331 lxml.sax.ElementTreeContentHandler.etree
332 lxml.tests.test_elementtree.CElementTreeTestCase.etree
333 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
334 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-77', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-78" class="py-name"><a title="lxml.cssselect.Element
337 lxml.objectify.Element
338 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
339 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-78', 'Element', 'link-69');">Element</a></tt> </tt>
340 <a name="L76"></a><tt class="py-lineno"> 76</tt> <tt class="py-line"> <tt class="py-name">el</tt> <tt class="py-op">=</tt> <tt id="link-79" class="py-name"><a title="lxml.cssselect.Element
343 lxml.objectify.Element
344 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
345 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-79', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'name'</tt><tt class="py-op">)</tt> </tt>
346 <a name="L77"></a><tt class="py-lineno"> 77</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-80" class="py-name"><a title="lxml.cssselect.Element
349 lxml.objectify.Element
350 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
351 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-80', 'Element', 'link-69');">Element</a></tt><tt class="py-op">,</tt> <tt class="py-string">'{}'</tt><tt class="py-op">)</tt> </tt>
352 <a name="L78"></a><tt class="py-lineno"> 78</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-81" class="py-name" targets="Method lxml.objectify.ObjectPath.setattr()=lxml.objectify.ObjectPath-class.html#setattr"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-81', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">,</tt> <tt class="py-string">'tag'</tt><tt class="py-op">,</tt> <tt class="py-string">'{}'</tt><tt class="py-op">)</tt> </tt>
353 <a name="L79"></a><tt class="py-lineno"> 79</tt> <tt class="py-line"> </tt>
354 <a name="L80"></a><tt class="py-lineno"> 80</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-82" class="py-name"><a title="lxml.cssselect.Element
357 lxml.objectify.Element
358 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
359 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-82', 'Element', 'link-69');">Element</a></tt><tt class="py-op">,</tt> <tt class="py-string">'{test}'</tt><tt class="py-op">)</tt> </tt>
360 <a name="L81"></a><tt class="py-lineno"> 81</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-83" class="py-name"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-83', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">,</tt> <tt class="py-string">'tag'</tt><tt class="py-op">,</tt> <tt class="py-string">'{test}'</tt><tt class="py-op">)</tt> </tt>
361 </div><a name="L82"></a><tt class="py-lineno"> 82</tt> <tt class="py-line"> </tt>
362 <a name="ETreeOnlyTestCase.test_element_name_colon"></a><div id="ETreeOnlyTestCase.test_element_name_colon-def"><a name="L83"></a><tt class="py-lineno"> 83</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_element_name_colon-toggle" onclick="return toggle('ETreeOnlyTestCase.test_element_name_colon');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_element_name_colon">test_element_name_colon</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
363 </div><div id="ETreeOnlyTestCase.test_element_name_colon-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_element_name_colon-expanded"><a name="L84"></a><tt class="py-lineno"> 84</tt> <tt class="py-line"> <tt id="link-84" class="py-name"><a title="lxml.cssselect.Element
366 lxml.objectify.Element
367 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
368 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-84', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-85" class="py-name"><a title="lxml.etree
369 lxml.sax.ElementTreeContentHandler.etree
370 lxml.tests.test_elementtree.CElementTreeTestCase.etree
371 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
372 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-85', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-86" class="py-name"><a title="lxml.cssselect.Element
375 lxml.objectify.Element
376 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
377 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-86', 'Element', 'link-69');">Element</a></tt> </tt>
378 <a name="L85"></a><tt class="py-lineno"> 85</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-87" class="py-name"><a title="lxml.cssselect.Element
381 lxml.objectify.Element
382 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
383 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-87', 'Element', 'link-69');">Element</a></tt><tt class="py-op">,</tt> <tt class="py-string">'p:name'</tt><tt class="py-op">)</tt> </tt>
384 <a name="L86"></a><tt class="py-lineno"> 86</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-88" class="py-name"><a title="lxml.cssselect.Element
387 lxml.objectify.Element
388 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
389 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-88', 'Element', 'link-69');">Element</a></tt><tt class="py-op">,</tt> <tt class="py-string">'{test}p:name'</tt><tt class="py-op">)</tt> </tt>
390 <a name="L87"></a><tt class="py-lineno"> 87</tt> <tt class="py-line"> </tt>
391 <a name="L88"></a><tt class="py-lineno"> 88</tt> <tt class="py-line"> <tt class="py-name">el</tt> <tt class="py-op">=</tt> <tt id="link-89" class="py-name"><a title="lxml.cssselect.Element
394 lxml.objectify.Element
395 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
396 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-89', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'name'</tt><tt class="py-op">)</tt> </tt>
397 <a name="L89"></a><tt class="py-lineno"> 89</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-90" class="py-name"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-90', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">,</tt> <tt class="py-string">'tag'</tt><tt class="py-op">,</tt> <tt class="py-string">'p:name'</tt><tt class="py-op">)</tt> </tt>
398 </div><a name="L90"></a><tt class="py-lineno"> 90</tt> <tt class="py-line"> </tt>
399 <a name="ETreeOnlyTestCase.test_element_name_quote"></a><div id="ETreeOnlyTestCase.test_element_name_quote-def"><a name="L91"></a><tt class="py-lineno"> 91</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_element_name_quote-toggle" onclick="return toggle('ETreeOnlyTestCase.test_element_name_quote');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_element_name_quote">test_element_name_quote</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
400 </div><div id="ETreeOnlyTestCase.test_element_name_quote-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_element_name_quote-expanded"><a name="L92"></a><tt class="py-lineno"> 92</tt> <tt class="py-line"> <tt id="link-91" class="py-name"><a title="lxml.cssselect.Element
403 lxml.objectify.Element
404 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
405 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-91', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-92" class="py-name"><a title="lxml.etree
406 lxml.sax.ElementTreeContentHandler.etree
407 lxml.tests.test_elementtree.CElementTreeTestCase.etree
408 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
409 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-92', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-93" class="py-name"><a title="lxml.cssselect.Element
412 lxml.objectify.Element
413 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
414 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-93', 'Element', 'link-69');">Element</a></tt> </tt>
415 <a name="L93"></a><tt class="py-lineno"> 93</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-94" class="py-name"><a title="lxml.cssselect.Element
418 lxml.objectify.Element
419 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
420 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-94', 'Element', 'link-69');">Element</a></tt><tt class="py-op">,</tt> <tt class="py-string">"p'name"</tt><tt class="py-op">)</tt> </tt>
421 <a name="L94"></a><tt class="py-lineno"> 94</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-95" class="py-name"><a title="lxml.cssselect.Element
424 lxml.objectify.Element
425 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
426 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-95', 'Element', 'link-69');">Element</a></tt><tt class="py-op">,</tt> <tt class="py-string">'p"name'</tt><tt class="py-op">)</tt> </tt>
427 <a name="L95"></a><tt class="py-lineno"> 95</tt> <tt class="py-line"> </tt>
428 <a name="L96"></a><tt class="py-lineno"> 96</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-96" class="py-name"><a title="lxml.cssselect.Element
431 lxml.objectify.Element
432 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
433 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-96', 'Element', 'link-69');">Element</a></tt><tt class="py-op">,</tt> <tt class="py-string">"{test}p'name"</tt><tt class="py-op">)</tt> </tt>
434 <a name="L97"></a><tt class="py-lineno"> 97</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-97" class="py-name"><a title="lxml.cssselect.Element
437 lxml.objectify.Element
438 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
439 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-97', 'Element', 'link-69');">Element</a></tt><tt class="py-op">,</tt> <tt class="py-string">'{test}p"name'</tt><tt class="py-op">)</tt> </tt>
440 <a name="L98"></a><tt class="py-lineno"> 98</tt> <tt class="py-line"> </tt>
441 <a name="L99"></a><tt class="py-lineno"> 99</tt> <tt class="py-line"> <tt class="py-name">el</tt> <tt class="py-op">=</tt> <tt id="link-98" class="py-name"><a title="lxml.cssselect.Element
444 lxml.objectify.Element
445 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
446 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-98', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'name'</tt><tt class="py-op">)</tt> </tt>
447 <a name="L100"></a><tt class="py-lineno"> 100</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-99" class="py-name"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-99', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">,</tt> <tt class="py-string">'tag'</tt><tt class="py-op">,</tt> <tt class="py-string">"p'name"</tt><tt class="py-op">)</tt> </tt>
448 <a name="L101"></a><tt class="py-lineno"> 101</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-100" class="py-name"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-100', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">,</tt> <tt class="py-string">'tag'</tt><tt class="py-op">,</tt> <tt class="py-string">'p"name'</tt><tt class="py-op">)</tt> </tt>
449 </div><a name="L102"></a><tt class="py-lineno"> 102</tt> <tt class="py-line"> </tt>
450 <a name="ETreeOnlyTestCase.test_element_name_space"></a><div id="ETreeOnlyTestCase.test_element_name_space-def"><a name="L103"></a><tt class="py-lineno"> 103</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_element_name_space-toggle" onclick="return toggle('ETreeOnlyTestCase.test_element_name_space');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_element_name_space">test_element_name_space</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
451 </div><div id="ETreeOnlyTestCase.test_element_name_space-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_element_name_space-expanded"><a name="L104"></a><tt class="py-lineno"> 104</tt> <tt class="py-line"> <tt id="link-101" class="py-name"><a title="lxml.cssselect.Element
454 lxml.objectify.Element
455 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
456 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-101', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-102" class="py-name"><a title="lxml.etree
457 lxml.sax.ElementTreeContentHandler.etree
458 lxml.tests.test_elementtree.CElementTreeTestCase.etree
459 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
460 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-102', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-103" class="py-name"><a title="lxml.cssselect.Element
463 lxml.objectify.Element
464 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
465 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-103', 'Element', 'link-69');">Element</a></tt> </tt>
466 <a name="L105"></a><tt class="py-lineno"> 105</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-104" class="py-name"><a title="lxml.cssselect.Element
469 lxml.objectify.Element
470 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
471 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-104', 'Element', 'link-69');">Element</a></tt><tt class="py-op">,</tt> <tt class="py-string">' name '</tt><tt class="py-op">)</tt> </tt>
472 <a name="L106"></a><tt class="py-lineno"> 106</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-105" class="py-name"><a title="lxml.cssselect.Element
475 lxml.objectify.Element
476 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
477 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-105', 'Element', 'link-69');">Element</a></tt><tt class="py-op">,</tt> <tt class="py-string">'na me'</tt><tt class="py-op">)</tt> </tt>
478 <a name="L107"></a><tt class="py-lineno"> 107</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-106" class="py-name"><a title="lxml.cssselect.Element
481 lxml.objectify.Element
482 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
483 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-106', 'Element', 'link-69');">Element</a></tt><tt class="py-op">,</tt> <tt class="py-string">'{test} name'</tt><tt class="py-op">)</tt> </tt>
484 <a name="L108"></a><tt class="py-lineno"> 108</tt> <tt class="py-line"> </tt>
485 <a name="L109"></a><tt class="py-lineno"> 109</tt> <tt class="py-line"> <tt class="py-name">el</tt> <tt class="py-op">=</tt> <tt id="link-107" class="py-name"><a title="lxml.cssselect.Element
488 lxml.objectify.Element
489 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
490 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-107', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'name'</tt><tt class="py-op">)</tt> </tt>
491 <a name="L110"></a><tt class="py-lineno"> 110</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-108" class="py-name"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-108', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">,</tt> <tt class="py-string">'tag'</tt><tt class="py-op">,</tt> <tt class="py-string">' name '</tt><tt class="py-op">)</tt> </tt>
492 </div><a name="L111"></a><tt class="py-lineno"> 111</tt> <tt class="py-line"> </tt>
493 <a name="ETreeOnlyTestCase.test_subelement_name_empty"></a><div id="ETreeOnlyTestCase.test_subelement_name_empty-def"><a name="L112"></a><tt class="py-lineno"> 112</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_subelement_name_empty-toggle" onclick="return toggle('ETreeOnlyTestCase.test_subelement_name_empty');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_subelement_name_empty">test_subelement_name_empty</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
494 </div><div id="ETreeOnlyTestCase.test_subelement_name_empty-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_subelement_name_empty-expanded"><a name="L113"></a><tt class="py-lineno"> 113</tt> <tt class="py-line"> <tt id="link-109" class="py-name"><a title="lxml.cssselect.Element
497 lxml.objectify.Element
498 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
499 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-109', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-110" class="py-name"><a title="lxml.etree
500 lxml.sax.ElementTreeContentHandler.etree
501 lxml.tests.test_elementtree.CElementTreeTestCase.etree
502 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
503 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-110', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-111" class="py-name"><a title="lxml.cssselect.Element
506 lxml.objectify.Element
507 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
508 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-111', 'Element', 'link-69');">Element</a></tt> </tt>
509 <a name="L114"></a><tt class="py-lineno"> 114</tt> <tt class="py-line"> <tt id="link-112" class="py-name" targets="Function lxml.etree.SubElement()=lxml.etree-module.html#SubElement"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-112', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-113" class="py-name"><a title="lxml.etree
510 lxml.sax.ElementTreeContentHandler.etree
511 lxml.tests.test_elementtree.CElementTreeTestCase.etree
512 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
513 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-113', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-114" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-114', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
514 <a name="L115"></a><tt class="py-lineno"> 115</tt> <tt class="py-line"> </tt>
515 <a name="L116"></a><tt class="py-lineno"> 116</tt> <tt class="py-line"> <tt class="py-name">el</tt> <tt class="py-op">=</tt> <tt id="link-115" class="py-name"><a title="lxml.cssselect.Element
518 lxml.objectify.Element
519 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
520 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-115', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'name'</tt><tt class="py-op">)</tt> </tt>
521 <a name="L117"></a><tt class="py-lineno"> 117</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-116" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-116', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">,</tt> <tt class="py-string">'{}'</tt><tt class="py-op">)</tt> </tt>
522 <a name="L118"></a><tt class="py-lineno"> 118</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-117" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-117', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">,</tt> <tt class="py-string">'{test}'</tt><tt class="py-op">)</tt> </tt>
523 </div><a name="L119"></a><tt class="py-lineno"> 119</tt> <tt class="py-line"> </tt>
524 <a name="ETreeOnlyTestCase.test_subelement_name_colon"></a><div id="ETreeOnlyTestCase.test_subelement_name_colon-def"><a name="L120"></a><tt class="py-lineno"> 120</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_subelement_name_colon-toggle" onclick="return toggle('ETreeOnlyTestCase.test_subelement_name_colon');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_subelement_name_colon">test_subelement_name_colon</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
525 </div><div id="ETreeOnlyTestCase.test_subelement_name_colon-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_subelement_name_colon-expanded"><a name="L121"></a><tt class="py-lineno"> 121</tt> <tt class="py-line"> <tt id="link-118" class="py-name"><a title="lxml.cssselect.Element
528 lxml.objectify.Element
529 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
530 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-118', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-119" class="py-name"><a title="lxml.etree
531 lxml.sax.ElementTreeContentHandler.etree
532 lxml.tests.test_elementtree.CElementTreeTestCase.etree
533 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
534 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-119', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-120" class="py-name"><a title="lxml.cssselect.Element
537 lxml.objectify.Element
538 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
539 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-120', 'Element', 'link-69');">Element</a></tt> </tt>
540 <a name="L122"></a><tt class="py-lineno"> 122</tt> <tt class="py-line"> <tt id="link-121" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-121', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-122" class="py-name"><a title="lxml.etree
541 lxml.sax.ElementTreeContentHandler.etree
542 lxml.tests.test_elementtree.CElementTreeTestCase.etree
543 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
544 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-122', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-123" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-123', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
545 <a name="L123"></a><tt class="py-lineno"> 123</tt> <tt class="py-line"> </tt>
546 <a name="L124"></a><tt class="py-lineno"> 124</tt> <tt class="py-line"> <tt class="py-name">el</tt> <tt class="py-op">=</tt> <tt id="link-124" class="py-name"><a title="lxml.cssselect.Element
549 lxml.objectify.Element
550 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
551 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-124', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'name'</tt><tt class="py-op">)</tt> </tt>
552 <a name="L125"></a><tt class="py-lineno"> 125</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-125" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-125', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">,</tt> <tt class="py-string">'p:name'</tt><tt class="py-op">)</tt> </tt>
553 <a name="L126"></a><tt class="py-lineno"> 126</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-126" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-126', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">,</tt> <tt class="py-string">'{test}p:name'</tt><tt class="py-op">)</tt> </tt>
554 </div><a name="L127"></a><tt class="py-lineno"> 127</tt> <tt class="py-line"> </tt>
555 <a name="ETreeOnlyTestCase.test_subelement_name_quote"></a><div id="ETreeOnlyTestCase.test_subelement_name_quote-def"><a name="L128"></a><tt class="py-lineno"> 128</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_subelement_name_quote-toggle" onclick="return toggle('ETreeOnlyTestCase.test_subelement_name_quote');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_subelement_name_quote">test_subelement_name_quote</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
556 </div><div id="ETreeOnlyTestCase.test_subelement_name_quote-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_subelement_name_quote-expanded"><a name="L129"></a><tt class="py-lineno"> 129</tt> <tt class="py-line"> <tt id="link-127" class="py-name"><a title="lxml.cssselect.Element
559 lxml.objectify.Element
560 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
561 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-127', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-128" class="py-name"><a title="lxml.etree
562 lxml.sax.ElementTreeContentHandler.etree
563 lxml.tests.test_elementtree.CElementTreeTestCase.etree
564 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
565 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-128', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-129" class="py-name"><a title="lxml.cssselect.Element
568 lxml.objectify.Element
569 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
570 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-129', 'Element', 'link-69');">Element</a></tt> </tt>
571 <a name="L130"></a><tt class="py-lineno"> 130</tt> <tt class="py-line"> <tt id="link-130" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-130', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-131" class="py-name"><a title="lxml.etree
572 lxml.sax.ElementTreeContentHandler.etree
573 lxml.tests.test_elementtree.CElementTreeTestCase.etree
574 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
575 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-131', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-132" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-132', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
576 <a name="L131"></a><tt class="py-lineno"> 131</tt> <tt class="py-line"> </tt>
577 <a name="L132"></a><tt class="py-lineno"> 132</tt> <tt class="py-line"> <tt class="py-name">el</tt> <tt class="py-op">=</tt> <tt id="link-133" class="py-name"><a title="lxml.cssselect.Element
580 lxml.objectify.Element
581 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
582 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-133', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'name'</tt><tt class="py-op">)</tt> </tt>
583 <a name="L133"></a><tt class="py-lineno"> 133</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-134" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-134', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">,</tt> <tt class="py-string">"p'name"</tt><tt class="py-op">)</tt> </tt>
584 <a name="L134"></a><tt class="py-lineno"> 134</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-135" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-135', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">,</tt> <tt class="py-string">"{test}p'name"</tt><tt class="py-op">)</tt> </tt>
585 <a name="L135"></a><tt class="py-lineno"> 135</tt> <tt class="py-line"> </tt>
586 <a name="L136"></a><tt class="py-lineno"> 136</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-136" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-136', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">,</tt> <tt class="py-string">'p"name'</tt><tt class="py-op">)</tt> </tt>
587 <a name="L137"></a><tt class="py-lineno"> 137</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-137" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-137', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">,</tt> <tt class="py-string">'{test}p"name'</tt><tt class="py-op">)</tt> </tt>
588 </div><a name="L138"></a><tt class="py-lineno"> 138</tt> <tt class="py-line"> </tt>
589 <a name="ETreeOnlyTestCase.test_subelement_name_space"></a><div id="ETreeOnlyTestCase.test_subelement_name_space-def"><a name="L139"></a><tt class="py-lineno"> 139</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_subelement_name_space-toggle" onclick="return toggle('ETreeOnlyTestCase.test_subelement_name_space');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_subelement_name_space">test_subelement_name_space</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
590 </div><div id="ETreeOnlyTestCase.test_subelement_name_space-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_subelement_name_space-expanded"><a name="L140"></a><tt class="py-lineno"> 140</tt> <tt class="py-line"> <tt id="link-138" class="py-name"><a title="lxml.cssselect.Element
593 lxml.objectify.Element
594 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
595 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-138', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-139" class="py-name"><a title="lxml.etree
596 lxml.sax.ElementTreeContentHandler.etree
597 lxml.tests.test_elementtree.CElementTreeTestCase.etree
598 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
599 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-139', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-140" class="py-name"><a title="lxml.cssselect.Element
602 lxml.objectify.Element
603 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
604 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-140', 'Element', 'link-69');">Element</a></tt> </tt>
605 <a name="L141"></a><tt class="py-lineno"> 141</tt> <tt class="py-line"> <tt id="link-141" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-141', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-142" class="py-name"><a title="lxml.etree
606 lxml.sax.ElementTreeContentHandler.etree
607 lxml.tests.test_elementtree.CElementTreeTestCase.etree
608 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
609 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-142', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-143" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-143', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
610 <a name="L142"></a><tt class="py-lineno"> 142</tt> <tt class="py-line"> </tt>
611 <a name="L143"></a><tt class="py-lineno"> 143</tt> <tt class="py-line"> <tt class="py-name">el</tt> <tt class="py-op">=</tt> <tt id="link-144" class="py-name"><a title="lxml.cssselect.Element
614 lxml.objectify.Element
615 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
616 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-144', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'name'</tt><tt class="py-op">)</tt> </tt>
617 <a name="L144"></a><tt class="py-lineno"> 144</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-145" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-145', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">,</tt> <tt class="py-string">' name '</tt><tt class="py-op">)</tt> </tt>
618 <a name="L145"></a><tt class="py-lineno"> 145</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-146" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-146', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">,</tt> <tt class="py-string">'na me'</tt><tt class="py-op">)</tt> </tt>
619 <a name="L146"></a><tt class="py-lineno"> 146</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-147" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-147', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">,</tt> <tt class="py-string">'{test} name'</tt><tt class="py-op">)</tt> </tt>
620 </div><a name="L147"></a><tt class="py-lineno"> 147</tt> <tt class="py-line"> </tt>
621 <a name="ETreeOnlyTestCase.test_subelement_attribute_invalid"></a><div id="ETreeOnlyTestCase.test_subelement_attribute_invalid-def"><a name="L148"></a><tt class="py-lineno"> 148</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_subelement_attribute_invalid-toggle" onclick="return toggle('ETreeOnlyTestCase.test_subelement_attribute_invalid');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_subelement_attribute_invalid">test_subelement_attribute_invalid</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
622 </div><div id="ETreeOnlyTestCase.test_subelement_attribute_invalid-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_subelement_attribute_invalid-expanded"><a name="L149"></a><tt class="py-lineno"> 149</tt> <tt class="py-line"> <tt id="link-148" class="py-name"><a title="lxml.cssselect.Element
625 lxml.objectify.Element
626 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
627 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-148', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-149" class="py-name"><a title="lxml.etree
628 lxml.sax.ElementTreeContentHandler.etree
629 lxml.tests.test_elementtree.CElementTreeTestCase.etree
630 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
631 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-149', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-150" class="py-name"><a title="lxml.cssselect.Element
634 lxml.objectify.Element
635 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
636 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-150', 'Element', 'link-69');">Element</a></tt> </tt>
637 <a name="L150"></a><tt class="py-lineno"> 150</tt> <tt class="py-line"> <tt id="link-151" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-151', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-152" class="py-name"><a title="lxml.etree
638 lxml.sax.ElementTreeContentHandler.etree
639 lxml.tests.test_elementtree.CElementTreeTestCase.etree
640 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
641 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-152', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-153" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-153', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
642 <a name="L151"></a><tt class="py-lineno"> 151</tt> <tt class="py-line"> </tt>
643 <a name="L152"></a><tt class="py-lineno"> 152</tt> <tt class="py-line"> <tt class="py-name">el</tt> <tt class="py-op">=</tt> <tt id="link-154" class="py-name"><a title="lxml.cssselect.Element
646 lxml.objectify.Element
647 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
648 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-154', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'name'</tt><tt class="py-op">)</tt> </tt>
649 <a name="L153"></a><tt class="py-lineno"> 153</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-155" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-155', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">,</tt> <tt class="py-string">'name'</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-string">'a b c'</tt> <tt class="py-op">:</tt> <tt class="py-string">'abc'</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
650 <a name="L154"></a><tt class="py-lineno"> 154</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-156" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-156', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">,</tt> <tt class="py-string">'name'</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-string">'a'</tt> <tt class="py-op">:</tt> <tt class="py-string">'a\0\n'</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
651 <a name="L155"></a><tt class="py-lineno"> 155</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">el</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
652 </div><a name="L156"></a><tt class="py-lineno"> 156</tt> <tt class="py-line"> </tt>
653 <a name="ETreeOnlyTestCase.test_qname_empty"></a><div id="ETreeOnlyTestCase.test_qname_empty-def"><a name="L157"></a><tt class="py-lineno"> 157</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_qname_empty-toggle" onclick="return toggle('ETreeOnlyTestCase.test_qname_empty');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_qname_empty">test_qname_empty</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
654 </div><div id="ETreeOnlyTestCase.test_qname_empty-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_qname_empty-expanded"><a name="L158"></a><tt class="py-lineno"> 158</tt> <tt class="py-line"> <tt id="link-157" class="py-name" targets="Class lxml.etree.QName=lxml.etree.QName-class.html,Class xml.etree.ElementTree.QName=xml.etree.ElementTree.QName-class.html"><a title="lxml.etree.QName
655 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-157', 'QName', 'link-157');">QName</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-158" class="py-name"><a title="lxml.etree
656 lxml.sax.ElementTreeContentHandler.etree
657 lxml.tests.test_elementtree.CElementTreeTestCase.etree
658 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
659 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-158', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-159" class="py-name"><a title="lxml.etree.QName
660 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-159', 'QName', 'link-157');">QName</a></tt> </tt>
661 <a name="L159"></a><tt class="py-lineno"> 159</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-160" class="py-name"><a title="lxml.etree.QName
662 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-160', 'QName', 'link-157');">QName</a></tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
663 <a name="L160"></a><tt class="py-lineno"> 160</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-161" class="py-name"><a title="lxml.etree.QName
664 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-161', 'QName', 'link-157');">QName</a></tt><tt class="py-op">,</tt> <tt class="py-string">'test'</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
665 </div><a name="L161"></a><tt class="py-lineno"> 161</tt> <tt class="py-line"> </tt>
666 <a name="ETreeOnlyTestCase.test_qname_colon"></a><div id="ETreeOnlyTestCase.test_qname_colon-def"><a name="L162"></a><tt class="py-lineno"> 162</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_qname_colon-toggle" onclick="return toggle('ETreeOnlyTestCase.test_qname_colon');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_qname_colon">test_qname_colon</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
667 </div><div id="ETreeOnlyTestCase.test_qname_colon-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_qname_colon-expanded"><a name="L163"></a><tt class="py-lineno"> 163</tt> <tt class="py-line"> <tt id="link-162" class="py-name"><a title="lxml.etree.QName
668 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-162', 'QName', 'link-157');">QName</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-163" class="py-name"><a title="lxml.etree
669 lxml.sax.ElementTreeContentHandler.etree
670 lxml.tests.test_elementtree.CElementTreeTestCase.etree
671 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
672 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-163', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-164" class="py-name"><a title="lxml.etree.QName
673 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-164', 'QName', 'link-157');">QName</a></tt> </tt>
674 <a name="L164"></a><tt class="py-lineno"> 164</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-165" class="py-name"><a title="lxml.etree.QName
675 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-165', 'QName', 'link-157');">QName</a></tt><tt class="py-op">,</tt> <tt class="py-string">'p:name'</tt><tt class="py-op">)</tt> </tt>
676 <a name="L165"></a><tt class="py-lineno"> 165</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-166" class="py-name"><a title="lxml.etree.QName
677 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-166', 'QName', 'link-157');">QName</a></tt><tt class="py-op">,</tt> <tt class="py-string">'test'</tt><tt class="py-op">,</tt> <tt class="py-string">'p:name'</tt><tt class="py-op">)</tt> </tt>
678 </div><a name="L166"></a><tt class="py-lineno"> 166</tt> <tt class="py-line"> </tt>
679 <a name="ETreeOnlyTestCase.test_qname_space"></a><div id="ETreeOnlyTestCase.test_qname_space-def"><a name="L167"></a><tt class="py-lineno"> 167</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_qname_space-toggle" onclick="return toggle('ETreeOnlyTestCase.test_qname_space');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_qname_space">test_qname_space</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
680 </div><div id="ETreeOnlyTestCase.test_qname_space-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_qname_space-expanded"><a name="L168"></a><tt class="py-lineno"> 168</tt> <tt class="py-line"> <tt id="link-167" class="py-name"><a title="lxml.etree.QName
681 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-167', 'QName', 'link-157');">QName</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-168" class="py-name"><a title="lxml.etree
682 lxml.sax.ElementTreeContentHandler.etree
683 lxml.tests.test_elementtree.CElementTreeTestCase.etree
684 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
685 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-168', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-169" class="py-name"><a title="lxml.etree.QName
686 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-169', 'QName', 'link-157');">QName</a></tt> </tt>
687 <a name="L169"></a><tt class="py-lineno"> 169</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-170" class="py-name"><a title="lxml.etree.QName
688 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-170', 'QName', 'link-157');">QName</a></tt><tt class="py-op">,</tt> <tt class="py-string">' name '</tt><tt class="py-op">)</tt> </tt>
689 <a name="L170"></a><tt class="py-lineno"> 170</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-171" class="py-name"><a title="lxml.etree.QName
690 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-171', 'QName', 'link-157');">QName</a></tt><tt class="py-op">,</tt> <tt class="py-string">'na me'</tt><tt class="py-op">)</tt> </tt>
691 <a name="L171"></a><tt class="py-lineno"> 171</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-172" class="py-name"><a title="lxml.etree.QName
692 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-172', 'QName', 'link-157');">QName</a></tt><tt class="py-op">,</tt> <tt class="py-string">'test'</tt><tt class="py-op">,</tt> <tt class="py-string">' name'</tt><tt class="py-op">)</tt> </tt>
693 </div><a name="L172"></a><tt class="py-lineno"> 172</tt> <tt class="py-line"> </tt>
694 <a name="ETreeOnlyTestCase.test_qname_namespace_localname"></a><div id="ETreeOnlyTestCase.test_qname_namespace_localname-def"><a name="L173"></a><tt class="py-lineno"> 173</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_qname_namespace_localname-toggle" onclick="return toggle('ETreeOnlyTestCase.test_qname_namespace_localname');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_qname_namespace_localname">test_qname_namespace_localname</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
695 </div><div id="ETreeOnlyTestCase.test_qname_namespace_localname-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_qname_namespace_localname-expanded"><a name="L174"></a><tt class="py-lineno"> 174</tt> <tt class="py-line"> <tt class="py-comment"># ET doesn't have namespace/localname properties on QNames</tt> </tt>
696 <a name="L175"></a><tt class="py-lineno"> 175</tt> <tt class="py-line"> <tt id="link-173" class="py-name"><a title="lxml.etree.QName
697 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-173', 'QName', 'link-157');">QName</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-174" class="py-name"><a title="lxml.etree
698 lxml.sax.ElementTreeContentHandler.etree
699 lxml.tests.test_elementtree.CElementTreeTestCase.etree
700 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
701 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-174', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-175" class="py-name"><a title="lxml.etree.QName
702 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-175', 'QName', 'link-157');">QName</a></tt> </tt>
703 <a name="L176"></a><tt class="py-lineno"> 176</tt> <tt class="py-line"> <tt id="link-176" class="py-name" targets="Variable lxml.etree.QName.namespace=lxml.etree.QName-class.html#namespace"><a title="lxml.etree.QName.namespace" class="py-name" href="#" onclick="return doclink('link-176', 'namespace', 'link-176');">namespace</a></tt><tt class="py-op">,</tt> <tt id="link-177" class="py-name" targets="Variable lxml.etree.QName.localname=lxml.etree.QName-class.html#localname"><a title="lxml.etree.QName.localname" class="py-name" href="#" onclick="return doclink('link-177', 'localname', 'link-177');">localname</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'http://myns'</tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt> </tt>
704 <a name="L177"></a><tt class="py-lineno"> 177</tt> <tt class="py-line"> <tt class="py-name">qname</tt> <tt class="py-op">=</tt> <tt id="link-178" class="py-name"><a title="lxml.etree.QName
705 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-178', 'QName', 'link-157');">QName</a></tt><tt class="py-op">(</tt><tt id="link-179" class="py-name"><a title="lxml.etree.QName.namespace" class="py-name" href="#" onclick="return doclink('link-179', 'namespace', 'link-176');">namespace</a></tt><tt class="py-op">,</tt> <tt id="link-180" class="py-name"><a title="lxml.etree.QName.localname" class="py-name" href="#" onclick="return doclink('link-180', 'localname', 'link-177');">localname</a></tt><tt class="py-op">)</tt> </tt>
706 <a name="L178"></a><tt class="py-lineno"> 178</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-181" class="py-name"><a title="lxml.etree.QName.namespace" class="py-name" href="#" onclick="return doclink('link-181', 'namespace', 'link-176');">namespace</a></tt><tt class="py-op">,</tt> <tt class="py-name">qname</tt><tt class="py-op">.</tt><tt id="link-182" class="py-name"><a title="lxml.etree.QName.namespace" class="py-name" href="#" onclick="return doclink('link-182', 'namespace', 'link-176');">namespace</a></tt><tt class="py-op">)</tt> </tt>
707 <a name="L179"></a><tt class="py-lineno"> 179</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-183" class="py-name"><a title="lxml.etree.QName.localname" class="py-name" href="#" onclick="return doclink('link-183', 'localname', 'link-177');">localname</a></tt><tt class="py-op">,</tt> <tt class="py-name">qname</tt><tt class="py-op">.</tt><tt id="link-184" class="py-name"><a title="lxml.etree.QName.localname" class="py-name" href="#" onclick="return doclink('link-184', 'localname', 'link-177');">localname</a></tt><tt class="py-op">)</tt> </tt>
708 </div><a name="L180"></a><tt class="py-lineno"> 180</tt> <tt class="py-line"> </tt>
709 <a name="ETreeOnlyTestCase.test_qname_element"></a><div id="ETreeOnlyTestCase.test_qname_element-def"><a name="L181"></a><tt class="py-lineno"> 181</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_qname_element-toggle" onclick="return toggle('ETreeOnlyTestCase.test_qname_element');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_qname_element">test_qname_element</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
710 </div><div id="ETreeOnlyTestCase.test_qname_element-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_qname_element-expanded"><a name="L182"></a><tt class="py-lineno"> 182</tt> <tt class="py-line"> <tt class="py-comment"># ET doesn't have namespace/localname properties on QNames</tt> </tt>
711 <a name="L183"></a><tt class="py-lineno"> 183</tt> <tt class="py-line"> <tt id="link-185" class="py-name"><a title="lxml.etree.QName
712 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-185', 'QName', 'link-157');">QName</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-186" class="py-name"><a title="lxml.etree
713 lxml.sax.ElementTreeContentHandler.etree
714 lxml.tests.test_elementtree.CElementTreeTestCase.etree
715 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
716 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-186', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-187" class="py-name"><a title="lxml.etree.QName
717 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-187', 'QName', 'link-157');">QName</a></tt> </tt>
718 <a name="L184"></a><tt class="py-lineno"> 184</tt> <tt class="py-line"> <tt class="py-name">qname1</tt> <tt class="py-op">=</tt> <tt id="link-188" class="py-name"><a title="lxml.etree.QName
719 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-188', 'QName', 'link-157');">QName</a></tt><tt class="py-op">(</tt><tt class="py-string">'http://myns'</tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
720 <a name="L185"></a><tt class="py-lineno"> 185</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-189" class="py-name"><a title="lxml.etree
721 lxml.sax.ElementTreeContentHandler.etree
722 lxml.tests.test_elementtree.CElementTreeTestCase.etree
723 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
724 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-189', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-190" class="py-name"><a title="lxml.cssselect.Element
727 lxml.objectify.Element
728 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
729 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-190', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-name">qname1</tt><tt class="py-op">,</tt> <tt id="link-191" class="py-name" targets="Variable lxml.etree._Element.nsmap=lxml.etree._Element-class.html#nsmap"><a title="lxml.etree._Element.nsmap" class="py-name" href="#" onclick="return doclink('link-191', 'nsmap', 'link-191');">nsmap</a></tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-string">'p'</tt> <tt class="py-op">:</tt> <tt class="py-string">'http://myns'</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
730 <a name="L186"></a><tt class="py-lineno"> 186</tt> <tt class="py-line"> </tt>
731 <a name="L187"></a><tt class="py-lineno"> 187</tt> <tt class="py-line"> <tt class="py-name">qname2</tt> <tt class="py-op">=</tt> <tt id="link-192" class="py-name"><a title="lxml.etree.QName
732 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-192', 'QName', 'link-157');">QName</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt> </tt>
733 <a name="L188"></a><tt class="py-lineno"> 188</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-193" class="py-name"><a title="lxml.etree._Comment.tag
734 lxml.etree._Element.tag
735 lxml.etree._Entity.tag
736 lxml.etree._ProcessingInstruction.tag
737 lxml.etree._ReadOnlyProxy.tag
738 lxml.tests.test_xpathevaluator.tag
739 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-193', 'tag', 'link-73');">tag</a></tt><tt class="py-op">,</tt> <tt class="py-name">qname1</tt><tt class="py-op">.</tt><tt id="link-194" class="py-name" targets="Variable lxml.etree.QName.text=lxml.etree.QName-class.html#text,Variable lxml.etree._AppendOnlyElementProxy.text=lxml.etree._AppendOnlyElementProxy-class.html#text,Variable lxml.etree._Element.text=lxml.etree._Element-class.html#text,Variable lxml.etree._Entity.text=lxml.etree._Entity-class.html#text,Variable lxml.etree._ModifyContentOnlyProxy.text=lxml.etree._ModifyContentOnlyProxy-class.html#text,Variable lxml.etree._ReadOnlyEntityProxy.text=lxml.etree._ReadOnlyEntityProxy-class.html#text,Variable lxml.etree._ReadOnlyProxy.text=lxml.etree._ReadOnlyProxy-class.html#text,Variable lxml.etree.__ContentOnlyElement.text=lxml.etree.__ContentOnlyElement-class.html#text,Variable lxml.objectify.ObjectifiedElement.text=lxml.objectify.ObjectifiedElement-class.html#text,Variable xml.etree.ElementTree.Element.text=xml.etree.ElementTree.Element-class.html#text"><a title="lxml.etree.QName.text
740 lxml.etree._AppendOnlyElementProxy.text
741 lxml.etree._Element.text
742 lxml.etree._Entity.text
743 lxml.etree._ModifyContentOnlyProxy.text
744 lxml.etree._ReadOnlyEntityProxy.text
745 lxml.etree._ReadOnlyProxy.text
746 lxml.etree.__ContentOnlyElement.text
747 lxml.objectify.ObjectifiedElement.text
748 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-194', 'text', 'link-194');">text</a></tt><tt class="py-op">)</tt> </tt>
749 <a name="L189"></a><tt class="py-lineno"> 189</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">qname1</tt><tt class="py-op">.</tt><tt id="link-195" class="py-name"><a title="lxml.etree.QName.text
750 lxml.etree._AppendOnlyElementProxy.text
751 lxml.etree._Element.text
752 lxml.etree._Entity.text
753 lxml.etree._ModifyContentOnlyProxy.text
754 lxml.etree._ReadOnlyEntityProxy.text
755 lxml.etree._ReadOnlyProxy.text
756 lxml.etree.__ContentOnlyElement.text
757 lxml.objectify.ObjectifiedElement.text
758 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-195', 'text', 'link-194');">text</a></tt><tt class="py-op">,</tt> <tt class="py-name">qname2</tt><tt class="py-op">.</tt><tt id="link-196" class="py-name"><a title="lxml.etree.QName.text
759 lxml.etree._AppendOnlyElementProxy.text
760 lxml.etree._Element.text
761 lxml.etree._Entity.text
762 lxml.etree._ModifyContentOnlyProxy.text
763 lxml.etree._ReadOnlyEntityProxy.text
764 lxml.etree._ReadOnlyProxy.text
765 lxml.etree.__ContentOnlyElement.text
766 lxml.objectify.ObjectifiedElement.text
767 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-196', 'text', 'link-194');">text</a></tt><tt class="py-op">)</tt> </tt>
768 <a name="L190"></a><tt class="py-lineno"> 190</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">qname1</tt><tt class="py-op">,</tt> <tt class="py-name">qname2</tt><tt class="py-op">)</tt> </tt>
769 </div><a name="L191"></a><tt class="py-lineno"> 191</tt> <tt class="py-line"> </tt>
770 <a name="ETreeOnlyTestCase.test_qname_text_resolve"></a><div id="ETreeOnlyTestCase.test_qname_text_resolve-def"><a name="L192"></a><tt class="py-lineno"> 192</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_qname_text_resolve-toggle" onclick="return toggle('ETreeOnlyTestCase.test_qname_text_resolve');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_qname_text_resolve">test_qname_text_resolve</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
771 </div><div id="ETreeOnlyTestCase.test_qname_text_resolve-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_qname_text_resolve-expanded"><a name="L193"></a><tt class="py-lineno"> 193</tt> <tt class="py-line"> <tt class="py-comment"># ET doesn't resove QNames as text values</tt> </tt>
772 <a name="L194"></a><tt class="py-lineno"> 194</tt> <tt class="py-line"> <tt id="link-197" class="py-name"><a title="lxml.etree
773 lxml.sax.ElementTreeContentHandler.etree
774 lxml.tests.test_elementtree.CElementTreeTestCase.etree
775 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
776 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-197', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-198" class="py-name"><a title="lxml.etree
777 lxml.sax.ElementTreeContentHandler.etree
778 lxml.tests.test_elementtree.CElementTreeTestCase.etree
779 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
780 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-198', 'etree', 'link-10');">etree</a></tt> </tt>
781 <a name="L195"></a><tt class="py-lineno"> 195</tt> <tt class="py-line"> <tt class="py-name">qname</tt> <tt class="py-op">=</tt> <tt id="link-199" class="py-name"><a title="lxml.etree
782 lxml.sax.ElementTreeContentHandler.etree
783 lxml.tests.test_elementtree.CElementTreeTestCase.etree
784 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
785 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-199', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-200" class="py-name"><a title="lxml.etree.QName
786 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-200', 'QName', 'link-157');">QName</a></tt><tt class="py-op">(</tt><tt class="py-string">'http://myns'</tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
787 <a name="L196"></a><tt class="py-lineno"> 196</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-201" class="py-name"><a title="lxml.etree
788 lxml.sax.ElementTreeContentHandler.etree
789 lxml.tests.test_elementtree.CElementTreeTestCase.etree
790 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
791 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-201', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-202" class="py-name"><a title="lxml.cssselect.Element
794 lxml.objectify.Element
795 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
796 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-202', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-name">qname</tt><tt class="py-op">,</tt> <tt id="link-203" class="py-name"><a title="lxml.etree._Element.nsmap" class="py-name" href="#" onclick="return doclink('link-203', 'nsmap', 'link-191');">nsmap</a></tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-string">'p'</tt> <tt class="py-op">:</tt> <tt class="py-string">'http://myns'</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
797 <a name="L197"></a><tt class="py-lineno"> 197</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-204" class="py-name"><a title="lxml.etree.QName.text
798 lxml.etree._AppendOnlyElementProxy.text
799 lxml.etree._Element.text
800 lxml.etree._Entity.text
801 lxml.etree._ModifyContentOnlyProxy.text
802 lxml.etree._ReadOnlyEntityProxy.text
803 lxml.etree._ReadOnlyProxy.text
804 lxml.etree.__ContentOnlyElement.text
805 lxml.objectify.ObjectifiedElement.text
806 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-204', 'text', 'link-194');">text</a></tt> <tt class="py-op">=</tt> <tt class="py-name">qname</tt> </tt>
807 <a name="L198"></a><tt class="py-lineno"> 198</tt> <tt class="py-line"> </tt>
808 <a name="L199"></a><tt class="py-lineno"> 199</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-string">"p:a"</tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-205" class="py-name"><a title="lxml.etree.QName.text
809 lxml.etree._AppendOnlyElementProxy.text
810 lxml.etree._Element.text
811 lxml.etree._Entity.text
812 lxml.etree._ModifyContentOnlyProxy.text
813 lxml.etree._ReadOnlyEntityProxy.text
814 lxml.etree._ReadOnlyProxy.text
815 lxml.etree.__ContentOnlyElement.text
816 lxml.objectify.ObjectifiedElement.text
817 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-205', 'text', 'link-194');">text</a></tt><tt class="py-op">)</tt> </tt>
818 </div><a name="L200"></a><tt class="py-lineno"> 200</tt> <tt class="py-line"> </tt>
819 <a name="ETreeOnlyTestCase.test_nsmap_prefix_invalid"></a><div id="ETreeOnlyTestCase.test_nsmap_prefix_invalid-def"><a name="L201"></a><tt class="py-lineno"> 201</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_nsmap_prefix_invalid-toggle" onclick="return toggle('ETreeOnlyTestCase.test_nsmap_prefix_invalid');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_nsmap_prefix_invalid">test_nsmap_prefix_invalid</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
820 </div><div id="ETreeOnlyTestCase.test_nsmap_prefix_invalid-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_nsmap_prefix_invalid-expanded"><a name="L202"></a><tt class="py-lineno"> 202</tt> <tt class="py-line"> <tt id="link-206" class="py-name"><a title="lxml.etree
821 lxml.sax.ElementTreeContentHandler.etree
822 lxml.tests.test_elementtree.CElementTreeTestCase.etree
823 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
824 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-206', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-207" class="py-name"><a title="lxml.etree
825 lxml.sax.ElementTreeContentHandler.etree
826 lxml.tests.test_elementtree.CElementTreeTestCase.etree
827 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
828 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-207', 'etree', 'link-10');">etree</a></tt> </tt>
829 <a name="L203"></a><tt class="py-lineno"> 203</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> </tt>
830 <a name="L204"></a><tt class="py-lineno"> 204</tt> <tt class="py-line"> <tt id="link-208" class="py-name"><a title="lxml.etree
831 lxml.sax.ElementTreeContentHandler.etree
832 lxml.tests.test_elementtree.CElementTreeTestCase.etree
833 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
834 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-208', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-209" class="py-name"><a title="lxml.cssselect.Element
837 lxml.objectify.Element
838 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
839 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-209', 'Element', 'link-69');">Element</a></tt><tt class="py-op">,</tt> <tt class="py-string">"root"</tt><tt class="py-op">,</tt> <tt id="link-210" class="py-name"><a title="lxml.etree._Element.nsmap" class="py-name" href="#" onclick="return doclink('link-210', 'nsmap', 'link-191');">nsmap</a></tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-string">'"'</tt> <tt class="py-op">:</tt> <tt class="py-string">'testns'</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
840 <a name="L205"></a><tt class="py-lineno"> 205</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> </tt>
841 <a name="L206"></a><tt class="py-lineno"> 206</tt> <tt class="py-line"> <tt id="link-211" class="py-name"><a title="lxml.etree
842 lxml.sax.ElementTreeContentHandler.etree
843 lxml.tests.test_elementtree.CElementTreeTestCase.etree
844 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
845 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-211', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-212" class="py-name"><a title="lxml.cssselect.Element
848 lxml.objectify.Element
849 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
850 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-212', 'Element', 'link-69');">Element</a></tt><tt class="py-op">,</tt> <tt class="py-string">"root"</tt><tt class="py-op">,</tt> <tt id="link-213" class="py-name"><a title="lxml.etree._Element.nsmap" class="py-name" href="#" onclick="return doclink('link-213', 'nsmap', 'link-191');">nsmap</a></tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-string">'&'</tt> <tt class="py-op">:</tt> <tt class="py-string">'testns'</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
851 <a name="L207"></a><tt class="py-lineno"> 207</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> </tt>
852 <a name="L208"></a><tt class="py-lineno"> 208</tt> <tt class="py-line"> <tt id="link-214" class="py-name"><a title="lxml.etree
853 lxml.sax.ElementTreeContentHandler.etree
854 lxml.tests.test_elementtree.CElementTreeTestCase.etree
855 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
856 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-214', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-215" class="py-name"><a title="lxml.cssselect.Element
859 lxml.objectify.Element
860 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
861 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-215', 'Element', 'link-69');">Element</a></tt><tt class="py-op">,</tt> <tt class="py-string">"root"</tt><tt class="py-op">,</tt> <tt id="link-216" class="py-name"><a title="lxml.etree._Element.nsmap" class="py-name" href="#" onclick="return doclink('link-216', 'nsmap', 'link-191');">nsmap</a></tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-string">'a:b'</tt> <tt class="py-op">:</tt> <tt class="py-string">'testns'</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
862 </div><a name="L209"></a><tt class="py-lineno"> 209</tt> <tt class="py-line"> </tt>
863 <a name="ETreeOnlyTestCase.test_attribute_has_key"></a><div id="ETreeOnlyTestCase.test_attribute_has_key-def"><a name="L210"></a><tt class="py-lineno"> 210</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_attribute_has_key-toggle" onclick="return toggle('ETreeOnlyTestCase.test_attribute_has_key');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_attribute_has_key">test_attribute_has_key</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
864 </div><div id="ETreeOnlyTestCase.test_attribute_has_key-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_attribute_has_key-expanded"><a name="L211"></a><tt class="py-lineno"> 211</tt> <tt class="py-line"> <tt class="py-comment"># ET in Py 3.x has no "attrib.has_key()" method</tt> </tt>
865 <a name="L212"></a><tt class="py-lineno"> 212</tt> <tt class="py-line"> <tt id="link-217" class="py-name" targets="Function lxml.etree.XML()=lxml.etree-module.html#XML,Function lxml.objectify.XML()=lxml.objectify-module.html#XML,Method lxml.tests.test_objectify.ObjectifyTestCase.XML()=lxml.tests.test_objectify.ObjectifyTestCase-class.html#XML,Method lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML()=lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#XML"><a title="lxml.etree.XML
867 lxml.tests.test_objectify.ObjectifyTestCase.XML
868 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-217', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-218" class="py-name"><a title="lxml.etree
869 lxml.sax.ElementTreeContentHandler.etree
870 lxml.tests.test_elementtree.CElementTreeTestCase.etree
871 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
872 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-218', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-219" class="py-name"><a title="lxml.etree.XML
874 lxml.tests.test_objectify.ObjectifyTestCase.XML
875 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-219', 'XML', 'link-217');">XML</a></tt> </tt>
876 <a name="L213"></a><tt class="py-lineno"> 213</tt> <tt class="py-line"> </tt>
877 <a name="L214"></a><tt class="py-lineno"> 214</tt> <tt class="py-line"> <tt id="link-220" class="py-name" targets="Variable lxml.etree.iterparse.root=lxml.etree.iterparse-class.html#root"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-220', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-221" class="py-name"><a title="lxml.etree.XML
879 lxml.tests.test_objectify.ObjectifyTestCase.XML
880 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-221', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-222" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-222', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<foo bar="Bar" xmlns:ns="http://ns.codespeak.net/test" ns:baz="Baz" />'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
881 <a name="L215"></a><tt class="py-lineno"> 215</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
882 <a name="L216"></a><tt class="py-lineno"> 216</tt> <tt class="py-line"> <tt class="py-name">True</tt><tt class="py-op">,</tt> <tt id="link-223" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-223', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-224" class="py-name" targets="Variable lxml.etree._Element.attrib=lxml.etree._Element-class.html#attrib,Variable lxml.etree._ProcessingInstruction.attrib=lxml.etree._ProcessingInstruction-class.html#attrib,Variable lxml.etree._ReadOnlyElementProxy.attrib=lxml.etree._ReadOnlyElementProxy-class.html#attrib,Variable lxml.etree.__ContentOnlyElement.attrib=lxml.etree.__ContentOnlyElement-class.html#attrib,Variable xml.etree.ElementTree.Element.attrib=xml.etree.ElementTree.Element-class.html#attrib"><a title="lxml.etree._Element.attrib
883 lxml.etree._ProcessingInstruction.attrib
884 lxml.etree._ReadOnlyElementProxy.attrib
885 lxml.etree.__ContentOnlyElement.attrib
886 xml.etree.ElementTree.Element.attrib" class="py-name" href="#" onclick="return doclink('link-224', 'attrib', 'link-224');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-225" class="py-name" targets="Method lxml.etree._Attrib.has_key()=lxml.etree._Attrib-class.html#has_key,Method lxml.etree._IDDict.has_key()=lxml.etree._IDDict-class.html#has_key"><a title="lxml.etree._Attrib.has_key
887 lxml.etree._IDDict.has_key" class="py-name" href="#" onclick="return doclink('link-225', 'has_key', 'link-225');">has_key</a></tt><tt class="py-op">(</tt><tt class="py-string">'bar'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
888 <a name="L217"></a><tt class="py-lineno"> 217</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
889 <a name="L218"></a><tt class="py-lineno"> 218</tt> <tt class="py-line"> <tt class="py-name">False</tt><tt class="py-op">,</tt> <tt id="link-226" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-226', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-227" class="py-name"><a title="lxml.etree._Element.attrib
890 lxml.etree._ProcessingInstruction.attrib
891 lxml.etree._ReadOnlyElementProxy.attrib
892 lxml.etree.__ContentOnlyElement.attrib
893 xml.etree.ElementTree.Element.attrib" class="py-name" href="#" onclick="return doclink('link-227', 'attrib', 'link-224');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-228" class="py-name"><a title="lxml.etree._Attrib.has_key
894 lxml.etree._IDDict.has_key" class="py-name" href="#" onclick="return doclink('link-228', 'has_key', 'link-225');">has_key</a></tt><tt class="py-op">(</tt><tt class="py-string">'baz'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
895 <a name="L219"></a><tt class="py-lineno"> 219</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
896 <a name="L220"></a><tt class="py-lineno"> 220</tt> <tt class="py-line"> <tt class="py-name">False</tt><tt class="py-op">,</tt> <tt id="link-229" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-229', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-230" class="py-name"><a title="lxml.etree._Element.attrib
897 lxml.etree._ProcessingInstruction.attrib
898 lxml.etree._ReadOnlyElementProxy.attrib
899 lxml.etree.__ContentOnlyElement.attrib
900 xml.etree.ElementTree.Element.attrib" class="py-name" href="#" onclick="return doclink('link-230', 'attrib', 'link-224');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-231" class="py-name"><a title="lxml.etree._Attrib.has_key
901 lxml.etree._IDDict.has_key" class="py-name" href="#" onclick="return doclink('link-231', 'has_key', 'link-225');">has_key</a></tt><tt class="py-op">(</tt><tt class="py-string">'hah'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
902 <a name="L221"></a><tt class="py-lineno"> 221</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
903 <a name="L222"></a><tt class="py-lineno"> 222</tt> <tt class="py-line"> <tt class="py-name">True</tt><tt class="py-op">,</tt> </tt>
904 <a name="L223"></a><tt class="py-lineno"> 223</tt> <tt class="py-line"> <tt id="link-232" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-232', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-233" class="py-name"><a title="lxml.etree._Element.attrib
905 lxml.etree._ProcessingInstruction.attrib
906 lxml.etree._ReadOnlyElementProxy.attrib
907 lxml.etree.__ContentOnlyElement.attrib
908 xml.etree.ElementTree.Element.attrib" class="py-name" href="#" onclick="return doclink('link-233', 'attrib', 'link-224');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-234" class="py-name"><a title="lxml.etree._Attrib.has_key
909 lxml.etree._IDDict.has_key" class="py-name" href="#" onclick="return doclink('link-234', 'has_key', 'link-225');">has_key</a></tt><tt class="py-op">(</tt><tt class="py-string">'{http://ns.codespeak.net/test}baz'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
910 </div><a name="L224"></a><tt class="py-lineno"> 224</tt> <tt class="py-line"> </tt>
911 <a name="ETreeOnlyTestCase.test_attribute_set"></a><div id="ETreeOnlyTestCase.test_attribute_set-def"><a name="L225"></a><tt class="py-lineno"> 225</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_attribute_set-toggle" onclick="return toggle('ETreeOnlyTestCase.test_attribute_set');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_attribute_set">test_attribute_set</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
912 </div><div id="ETreeOnlyTestCase.test_attribute_set-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_attribute_set-expanded"><a name="L226"></a><tt class="py-lineno"> 226</tt> <tt class="py-line"> <tt id="link-235" class="py-name"><a title="lxml.cssselect.Element
915 lxml.objectify.Element
916 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
917 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-235', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-236" class="py-name"><a title="lxml.etree
918 lxml.sax.ElementTreeContentHandler.etree
919 lxml.tests.test_elementtree.CElementTreeTestCase.etree
920 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
921 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-236', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-237" class="py-name"><a title="lxml.cssselect.Element
924 lxml.objectify.Element
925 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
926 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-237', 'Element', 'link-69');">Element</a></tt> </tt>
927 <a name="L227"></a><tt class="py-lineno"> 227</tt> <tt class="py-line"> <tt id="link-238" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-238', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-239" class="py-name"><a title="lxml.cssselect.Element
930 lxml.objectify.Element
931 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
932 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-239', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">"root"</tt><tt class="py-op">)</tt> </tt>
933 <a name="L228"></a><tt class="py-lineno"> 228</tt> <tt class="py-line"> <tt id="link-240" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-240', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-241" class="py-name" targets="Method lxml.etree._Element.set()=lxml.etree._Element-class.html#set,Method lxml.etree._XSLTProcessingInstruction.set()=lxml.etree._XSLTProcessingInstruction-class.html#set,Method lxml.etree.__ContentOnlyElement.set()=lxml.etree.__ContentOnlyElement-class.html#set"><a title="lxml.etree._Element.set
934 lxml.etree._XSLTProcessingInstruction.set
935 lxml.etree.__ContentOnlyElement.set" class="py-name" href="#" onclick="return doclink('link-241', 'set', 'link-241');">set</a></tt><tt class="py-op">(</tt><tt class="py-string">"attr"</tt><tt class="py-op">,</tt> <tt class="py-string">"TEST"</tt><tt class="py-op">)</tt> </tt>
936 <a name="L229"></a><tt class="py-lineno"> 229</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-string">"TEST"</tt><tt class="py-op">,</tt> <tt id="link-242" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-242', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-243" class="py-name" targets="Method lxml.etree._Attrib.get()=lxml.etree._Attrib-class.html#get,Method lxml.etree._Element.get()=lxml.etree._Element-class.html#get,Method lxml.etree._IDDict.get()=lxml.etree._IDDict-class.html#get,Method lxml.etree._ProcessingInstruction.get()=lxml.etree._ProcessingInstruction-class.html#get,Method lxml.etree._ReadOnlyElementProxy.get()=lxml.etree._ReadOnlyElementProxy-class.html#get,Method lxml.etree.__ContentOnlyElement.get()=lxml.etree.__ContentOnlyElement-class.html#get"><a title="lxml.etree._Attrib.get
937 lxml.etree._Element.get
938 lxml.etree._IDDict.get
939 lxml.etree._ProcessingInstruction.get
940 lxml.etree._ReadOnlyElementProxy.get
941 lxml.etree.__ContentOnlyElement.get" class="py-name" href="#" onclick="return doclink('link-243', 'get', 'link-243');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">"attr"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
942 </div><a name="L230"></a><tt class="py-lineno"> 230</tt> <tt class="py-line"> </tt>
943 <a name="ETreeOnlyTestCase.test_attribute_set_invalid"></a><div id="ETreeOnlyTestCase.test_attribute_set_invalid-def"><a name="L231"></a><tt class="py-lineno"> 231</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_attribute_set_invalid-toggle" onclick="return toggle('ETreeOnlyTestCase.test_attribute_set_invalid');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_attribute_set_invalid">test_attribute_set_invalid</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
944 </div><div id="ETreeOnlyTestCase.test_attribute_set_invalid-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_attribute_set_invalid-expanded"><a name="L232"></a><tt class="py-lineno"> 232</tt> <tt class="py-line"> <tt class="py-comment"># ElementTree accepts arbitrary attribute values</tt> </tt>
945 <a name="L233"></a><tt class="py-lineno"> 233</tt> <tt class="py-line"> <tt class="py-comment"># lxml.etree allows only strings</tt> </tt>
946 <a name="L234"></a><tt class="py-lineno"> 234</tt> <tt class="py-line"> <tt id="link-244" class="py-name"><a title="lxml.cssselect.Element
949 lxml.objectify.Element
950 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
951 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-244', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-245" class="py-name"><a title="lxml.etree
952 lxml.sax.ElementTreeContentHandler.etree
953 lxml.tests.test_elementtree.CElementTreeTestCase.etree
954 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
955 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-245', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-246" class="py-name"><a title="lxml.cssselect.Element
958 lxml.objectify.Element
959 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
960 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-246', 'Element', 'link-69');">Element</a></tt> </tt>
961 <a name="L235"></a><tt class="py-lineno"> 235</tt> <tt class="py-line"> <tt id="link-247" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-247', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-248" class="py-name"><a title="lxml.cssselect.Element
964 lxml.objectify.Element
965 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
966 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-248', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">"root"</tt><tt class="py-op">)</tt> </tt>
967 <a name="L236"></a><tt class="py-lineno"> 236</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">TypeError</tt><tt class="py-op">,</tt> <tt id="link-249" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-249', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-250" class="py-name"><a title="lxml.etree._Element.set
968 lxml.etree._XSLTProcessingInstruction.set
969 lxml.etree.__ContentOnlyElement.set" class="py-name" href="#" onclick="return doclink('link-250', 'set', 'link-241');">set</a></tt><tt class="py-op">,</tt> <tt class="py-string">"newattr"</tt><tt class="py-op">,</tt> <tt class="py-number">5</tt><tt class="py-op">)</tt> </tt>
970 <a name="L237"></a><tt class="py-lineno"> 237</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">TypeError</tt><tt class="py-op">,</tt> <tt id="link-251" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-251', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-252" class="py-name"><a title="lxml.etree._Element.set
971 lxml.etree._XSLTProcessingInstruction.set
972 lxml.etree.__ContentOnlyElement.set" class="py-name" href="#" onclick="return doclink('link-252', 'set', 'link-241');">set</a></tt><tt class="py-op">,</tt> <tt class="py-string">"newattr"</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
973 </div><a name="L238"></a><tt class="py-lineno"> 238</tt> <tt class="py-line"> </tt>
974 <a name="ETreeOnlyTestCase.test_strip_attributes"></a><div id="ETreeOnlyTestCase.test_strip_attributes-def"><a name="L239"></a><tt class="py-lineno"> 239</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_strip_attributes-toggle" onclick="return toggle('ETreeOnlyTestCase.test_strip_attributes');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_strip_attributes">test_strip_attributes</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
975 </div><div id="ETreeOnlyTestCase.test_strip_attributes-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_strip_attributes-expanded"><a name="L240"></a><tt class="py-lineno"> 240</tt> <tt class="py-line"> <tt id="link-253" class="py-name"><a title="lxml.etree.XML
977 lxml.tests.test_objectify.ObjectifyTestCase.XML
978 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-253', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-254" class="py-name"><a title="lxml.etree
979 lxml.sax.ElementTreeContentHandler.etree
980 lxml.tests.test_elementtree.CElementTreeTestCase.etree
981 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
982 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-254', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-255" class="py-name"><a title="lxml.etree.XML
984 lxml.tests.test_objectify.ObjectifyTestCase.XML
985 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-255', 'XML', 'link-217');">XML</a></tt> </tt>
986 <a name="L241"></a><tt class="py-lineno"> 241</tt> <tt class="py-line"> <tt id="link-256" class="py-name" targets="Variable lxml.tests.test_threading.ThreadPipelineTestCase.xml=lxml.tests.test_threading.ThreadPipelineTestCase-class.html#xml"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-256', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-257" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-257', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test a="5" b="10" c="20"><x a="4" b="2"/></test>'</tt><tt class="py-op">)</tt> </tt>
987 <a name="L242"></a><tt class="py-lineno"> 242</tt> <tt class="py-line"> </tt>
988 <a name="L243"></a><tt class="py-lineno"> 243</tt> <tt class="py-line"> <tt id="link-258" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-258', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-259" class="py-name"><a title="lxml.etree.XML
990 lxml.tests.test_objectify.ObjectifyTestCase.XML
991 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-259', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-260" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-260', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
992 <a name="L244"></a><tt class="py-lineno"> 244</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-261" class="py-name"><a title="lxml.etree
993 lxml.sax.ElementTreeContentHandler.etree
994 lxml.tests.test_elementtree.CElementTreeTestCase.etree
995 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
996 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-261', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-262" class="py-name" targets="Function lxml.etree.strip_attributes()=lxml.etree-module.html#strip_attributes"><a title="lxml.etree.strip_attributes" class="py-name" href="#" onclick="return doclink('link-262', 'strip_attributes', 'link-262');">strip_attributes</a></tt><tt class="py-op">(</tt><tt id="link-263" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-263', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
997 <a name="L245"></a><tt class="py-lineno"> 245</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-264" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-264', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test b="10" c="20"><x b="2"></x></test>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
998 <a name="L246"></a><tt class="py-lineno"> 246</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-265" class="py-name" targets="Method lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement()=lxml.tests.test_elementtree.ETreeTestCaseBase-class.html#_writeElement,Method lxml.tests.test_etree.ETreeOnlyTestCase._writeElement()=lxml.tests.test_etree.ETreeOnlyTestCase-class.html#_writeElement"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
999 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-265', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-266" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-266', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1000 <a name="L247"></a><tt class="py-lineno"> 247</tt> <tt class="py-line"> </tt>
1001 <a name="L248"></a><tt class="py-lineno"> 248</tt> <tt class="py-line"> <tt id="link-267" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-267', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-268" class="py-name"><a title="lxml.etree.XML
1003 lxml.tests.test_objectify.ObjectifyTestCase.XML
1004 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-268', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-269" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-269', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1005 <a name="L249"></a><tt class="py-lineno"> 249</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-270" class="py-name"><a title="lxml.etree
1006 lxml.sax.ElementTreeContentHandler.etree
1007 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1008 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1009 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-270', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-271" class="py-name"><a title="lxml.etree.strip_attributes" class="py-name" href="#" onclick="return doclink('link-271', 'strip_attributes', 'link-262');">strip_attributes</a></tt><tt class="py-op">(</tt><tt id="link-272" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-272', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
1010 <a name="L250"></a><tt class="py-lineno"> 250</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-273" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-273', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test a="5"><x a="4"></x></test>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1011 <a name="L251"></a><tt class="py-lineno"> 251</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-274" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1012 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-274', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-275" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-275', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1013 </div><a name="L252"></a><tt class="py-lineno"> 252</tt> <tt class="py-line"> </tt>
1014 <a name="ETreeOnlyTestCase.test_strip_attributes_ns"></a><div id="ETreeOnlyTestCase.test_strip_attributes_ns-def"><a name="L253"></a><tt class="py-lineno"> 253</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_strip_attributes_ns-toggle" onclick="return toggle('ETreeOnlyTestCase.test_strip_attributes_ns');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_strip_attributes_ns">test_strip_attributes_ns</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
1015 </div><div id="ETreeOnlyTestCase.test_strip_attributes_ns-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_strip_attributes_ns-expanded"><a name="L254"></a><tt class="py-lineno"> 254</tt> <tt class="py-line"> <tt id="link-276" class="py-name"><a title="lxml.etree.XML
1017 lxml.tests.test_objectify.ObjectifyTestCase.XML
1018 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-276', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-277" class="py-name"><a title="lxml.etree
1019 lxml.sax.ElementTreeContentHandler.etree
1020 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1021 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1022 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-277', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-278" class="py-name"><a title="lxml.etree.XML
1024 lxml.tests.test_objectify.ObjectifyTestCase.XML
1025 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-278', 'XML', 'link-217');">XML</a></tt> </tt>
1026 <a name="L255"></a><tt class="py-lineno"> 255</tt> <tt class="py-line"> <tt id="link-279" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-279', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-280" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-280', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test xmlns:n="http://test/ns" a="6" b="10" c="20" n:a="5"><x a="4" n:b="2"/></test>'</tt><tt class="py-op">)</tt> </tt>
1027 <a name="L256"></a><tt class="py-lineno"> 256</tt> <tt class="py-line"> </tt>
1028 <a name="L257"></a><tt class="py-lineno"> 257</tt> <tt class="py-line"> <tt id="link-281" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-281', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-282" class="py-name"><a title="lxml.etree.XML
1030 lxml.tests.test_objectify.ObjectifyTestCase.XML
1031 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-282', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-283" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-283', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1032 <a name="L258"></a><tt class="py-lineno"> 258</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-284" class="py-name"><a title="lxml.etree
1033 lxml.sax.ElementTreeContentHandler.etree
1034 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1035 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1036 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-284', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-285" class="py-name"><a title="lxml.etree.strip_attributes" class="py-name" href="#" onclick="return doclink('link-285', 'strip_attributes', 'link-262');">strip_attributes</a></tt><tt class="py-op">(</tt><tt id="link-286" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-286', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
1037 <a name="L259"></a><tt class="py-lineno"> 259</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
1038 <a name="L260"></a><tt class="py-lineno"> 260</tt> <tt class="py-line"> <tt id="link-287" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-287', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test xmlns:n="http://test/ns" b="10" c="20" n:a="5"><x n:b="2"></x></test>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1039 <a name="L261"></a><tt class="py-lineno"> 261</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-288" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1040 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-288', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-289" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-289', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1041 <a name="L262"></a><tt class="py-lineno"> 262</tt> <tt class="py-line"> </tt>
1042 <a name="L263"></a><tt class="py-lineno"> 263</tt> <tt class="py-line"> <tt id="link-290" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-290', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-291" class="py-name"><a title="lxml.etree.XML
1044 lxml.tests.test_objectify.ObjectifyTestCase.XML
1045 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-291', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-292" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-292', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1046 <a name="L264"></a><tt class="py-lineno"> 264</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-293" class="py-name"><a title="lxml.etree
1047 lxml.sax.ElementTreeContentHandler.etree
1048 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1049 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1050 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-293', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-294" class="py-name"><a title="lxml.etree.strip_attributes" class="py-name" href="#" onclick="return doclink('link-294', 'strip_attributes', 'link-262');">strip_attributes</a></tt><tt class="py-op">(</tt><tt id="link-295" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-295', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'{http://test/ns}a'</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
1051 <a name="L265"></a><tt class="py-lineno"> 265</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
1052 <a name="L266"></a><tt class="py-lineno"> 266</tt> <tt class="py-line"> <tt id="link-296" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-296', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test xmlns:n="http://test/ns" a="6" b="10"><x a="4" n:b="2"></x></test>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1053 <a name="L267"></a><tt class="py-lineno"> 267</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-297" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1054 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-297', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-298" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-298', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1055 <a name="L268"></a><tt class="py-lineno"> 268</tt> <tt class="py-line"> </tt>
1056 <a name="L269"></a><tt class="py-lineno"> 269</tt> <tt class="py-line"> <tt id="link-299" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-299', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-300" class="py-name"><a title="lxml.etree.XML
1058 lxml.tests.test_objectify.ObjectifyTestCase.XML
1059 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-300', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-301" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-301', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1060 <a name="L270"></a><tt class="py-lineno"> 270</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-302" class="py-name"><a title="lxml.etree
1061 lxml.sax.ElementTreeContentHandler.etree
1062 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1063 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1064 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-302', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-303" class="py-name"><a title="lxml.etree.strip_attributes" class="py-name" href="#" onclick="return doclink('link-303', 'strip_attributes', 'link-262');">strip_attributes</a></tt><tt class="py-op">(</tt><tt id="link-304" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-304', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'{http://test/ns}*'</tt><tt class="py-op">)</tt> </tt>
1065 <a name="L271"></a><tt class="py-lineno"> 271</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
1066 <a name="L272"></a><tt class="py-lineno"> 272</tt> <tt class="py-line"> <tt id="link-305" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-305', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test xmlns:n="http://test/ns" a="6" b="10" c="20"><x a="4"></x></test>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1067 <a name="L273"></a><tt class="py-lineno"> 273</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-306" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1068 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-306', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-307" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-307', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1069 </div><a name="L274"></a><tt class="py-lineno"> 274</tt> <tt class="py-line"> </tt>
1070 <a name="ETreeOnlyTestCase.test_strip_elements"></a><div id="ETreeOnlyTestCase.test_strip_elements-def"><a name="L275"></a><tt class="py-lineno"> 275</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_strip_elements-toggle" onclick="return toggle('ETreeOnlyTestCase.test_strip_elements');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_strip_elements">test_strip_elements</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
1071 </div><div id="ETreeOnlyTestCase.test_strip_elements-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_strip_elements-expanded"><a name="L276"></a><tt class="py-lineno"> 276</tt> <tt class="py-line"> <tt id="link-308" class="py-name"><a title="lxml.etree.XML
1073 lxml.tests.test_objectify.ObjectifyTestCase.XML
1074 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-308', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-309" class="py-name"><a title="lxml.etree
1075 lxml.sax.ElementTreeContentHandler.etree
1076 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1077 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1078 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-309', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-310" class="py-name"><a title="lxml.etree.XML
1080 lxml.tests.test_objectify.ObjectifyTestCase.XML
1081 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-310', 'XML', 'link-217');">XML</a></tt> </tt>
1082 <a name="L277"></a><tt class="py-lineno"> 277</tt> <tt class="py-line"> <tt id="link-311" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-311', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-312" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-312', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test><a><b><c/></b></a><x><a><b/><c/></a></x></test>'</tt><tt class="py-op">)</tt> </tt>
1083 <a name="L278"></a><tt class="py-lineno"> 278</tt> <tt class="py-line"> </tt>
1084 <a name="L279"></a><tt class="py-lineno"> 279</tt> <tt class="py-line"> <tt id="link-313" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-313', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-314" class="py-name"><a title="lxml.etree.XML
1086 lxml.tests.test_objectify.ObjectifyTestCase.XML
1087 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-314', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-315" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-315', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1088 <a name="L280"></a><tt class="py-lineno"> 280</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-316" class="py-name"><a title="lxml.etree
1089 lxml.sax.ElementTreeContentHandler.etree
1090 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1091 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1092 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-316', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-317" class="py-name" targets="Function lxml.etree.strip_elements()=lxml.etree-module.html#strip_elements"><a title="lxml.etree.strip_elements" class="py-name" href="#" onclick="return doclink('link-317', 'strip_elements', 'link-317');">strip_elements</a></tt><tt class="py-op">(</tt><tt id="link-318" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-318', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
1093 <a name="L281"></a><tt class="py-lineno"> 281</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-319" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-319', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test><x></x></test>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1094 <a name="L282"></a><tt class="py-lineno"> 282</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-320" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1095 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-320', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-321" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-321', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1096 <a name="L283"></a><tt class="py-lineno"> 283</tt> <tt class="py-line"> </tt>
1097 <a name="L284"></a><tt class="py-lineno"> 284</tt> <tt class="py-line"> <tt id="link-322" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-322', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-323" class="py-name"><a title="lxml.etree.XML
1099 lxml.tests.test_objectify.ObjectifyTestCase.XML
1100 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-323', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-324" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-324', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1101 <a name="L285"></a><tt class="py-lineno"> 285</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-325" class="py-name"><a title="lxml.etree
1102 lxml.sax.ElementTreeContentHandler.etree
1103 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1104 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1105 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-325', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-326" class="py-name"><a title="lxml.etree.strip_elements" class="py-name" href="#" onclick="return doclink('link-326', 'strip_elements', 'link-317');">strip_elements</a></tt><tt class="py-op">(</tt><tt id="link-327" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-327', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">,</tt> <tt class="py-string">'X'</tt><tt class="py-op">,</tt> <tt class="py-string">'Y'</tt><tt class="py-op">,</tt> <tt class="py-string">'Z'</tt><tt class="py-op">)</tt> </tt>
1106 <a name="L286"></a><tt class="py-lineno"> 286</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-328" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-328', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test><a></a><x><a></a></x></test>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1107 <a name="L287"></a><tt class="py-lineno"> 287</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-329" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1108 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-329', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-330" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-330', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1109 <a name="L288"></a><tt class="py-lineno"> 288</tt> <tt class="py-line"> </tt>
1110 <a name="L289"></a><tt class="py-lineno"> 289</tt> <tt class="py-line"> <tt id="link-331" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-331', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-332" class="py-name"><a title="lxml.etree.XML
1112 lxml.tests.test_objectify.ObjectifyTestCase.XML
1113 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-332', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-333" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-333', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1114 <a name="L290"></a><tt class="py-lineno"> 290</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-334" class="py-name"><a title="lxml.etree
1115 lxml.sax.ElementTreeContentHandler.etree
1116 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1117 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1118 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-334', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-335" class="py-name"><a title="lxml.etree.strip_elements" class="py-name" href="#" onclick="return doclink('link-335', 'strip_elements', 'link-317');">strip_elements</a></tt><tt class="py-op">(</tt><tt id="link-336" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-336', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
1119 <a name="L291"></a><tt class="py-lineno"> 291</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-337" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-337', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test><a><b></b></a><x><a><b></b></a></x></test>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1120 <a name="L292"></a><tt class="py-lineno"> 292</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-338" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1121 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-338', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-339" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-339', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1122 </div><a name="L293"></a><tt class="py-lineno"> 293</tt> <tt class="py-line"> </tt>
1123 <a name="ETreeOnlyTestCase.test_strip_elements_ns"></a><div id="ETreeOnlyTestCase.test_strip_elements_ns-def"><a name="L294"></a><tt class="py-lineno"> 294</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_strip_elements_ns-toggle" onclick="return toggle('ETreeOnlyTestCase.test_strip_elements_ns');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_strip_elements_ns">test_strip_elements_ns</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
1124 </div><div id="ETreeOnlyTestCase.test_strip_elements_ns-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_strip_elements_ns-expanded"><a name="L295"></a><tt class="py-lineno"> 295</tt> <tt class="py-line"> <tt id="link-340" class="py-name"><a title="lxml.etree.XML
1126 lxml.tests.test_objectify.ObjectifyTestCase.XML
1127 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-340', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-341" class="py-name"><a title="lxml.etree
1128 lxml.sax.ElementTreeContentHandler.etree
1129 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1130 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1131 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-341', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-342" class="py-name"><a title="lxml.etree.XML
1133 lxml.tests.test_objectify.ObjectifyTestCase.XML
1134 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-342', 'XML', 'link-217');">XML</a></tt> </tt>
1135 <a name="L296"></a><tt class="py-lineno"> 296</tt> <tt class="py-line"> <tt id="link-343" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-343', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-344" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-344', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test>TEST<n:a xmlns:n="urn:a">A<b>B<c xmlns="urn:c"/>C</b>BT</n:a>AT<x>X<a>A<b xmlns="urn:a"/>BT<c xmlns="urn:x"/>CT</a>AT</x>XT</test>'</tt><tt class="py-op">)</tt> </tt>
1136 <a name="L297"></a><tt class="py-lineno"> 297</tt> <tt class="py-line"> </tt>
1137 <a name="L298"></a><tt class="py-lineno"> 298</tt> <tt class="py-line"> <tt id="link-345" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-345', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-346" class="py-name"><a title="lxml.etree.XML
1139 lxml.tests.test_objectify.ObjectifyTestCase.XML
1140 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-346', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-347" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-347', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1141 <a name="L299"></a><tt class="py-lineno"> 299</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-348" class="py-name"><a title="lxml.etree
1142 lxml.sax.ElementTreeContentHandler.etree
1143 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1144 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1145 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-348', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-349" class="py-name"><a title="lxml.etree.strip_elements" class="py-name" href="#" onclick="return doclink('link-349', 'strip_elements', 'link-317');">strip_elements</a></tt><tt class="py-op">(</tt><tt id="link-350" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-350', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
1146 <a name="L300"></a><tt class="py-lineno"> 300</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-351" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-351', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test>TEST<n:a xmlns:n="urn:a">A<b>B<c xmlns="urn:c"></c>C</b>BT</n:a>AT<x>X</x>XT</test>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1147 <a name="L301"></a><tt class="py-lineno"> 301</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-352" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1148 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-352', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-353" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-353', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1149 <a name="L302"></a><tt class="py-lineno"> 302</tt> <tt class="py-line"> </tt>
1150 <a name="L303"></a><tt class="py-lineno"> 303</tt> <tt class="py-line"> <tt id="link-354" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-354', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-355" class="py-name"><a title="lxml.etree.XML
1152 lxml.tests.test_objectify.ObjectifyTestCase.XML
1153 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-355', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-356" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-356', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1154 <a name="L304"></a><tt class="py-lineno"> 304</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-357" class="py-name"><a title="lxml.etree
1155 lxml.sax.ElementTreeContentHandler.etree
1156 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1157 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1158 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-357', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-358" class="py-name"><a title="lxml.etree.strip_elements" class="py-name" href="#" onclick="return doclink('link-358', 'strip_elements', 'link-317');">strip_elements</a></tt><tt class="py-op">(</tt><tt id="link-359" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-359', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'{urn:a}b'</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
1159 <a name="L305"></a><tt class="py-lineno"> 305</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-360" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-360', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test>TEST<n:a xmlns:n="urn:a">A<b>B<c xmlns="urn:c"></c>C</b>BT</n:a>AT<x>X<a>A<c xmlns="urn:x"></c>CT</a>AT</x>XT</test>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1160 <a name="L306"></a><tt class="py-lineno"> 306</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-361" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1161 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-361', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-362" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-362', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1162 <a name="L307"></a><tt class="py-lineno"> 307</tt> <tt class="py-line"> </tt>
1163 <a name="L308"></a><tt class="py-lineno"> 308</tt> <tt class="py-line"> <tt id="link-363" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-363', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-364" class="py-name"><a title="lxml.etree.XML
1165 lxml.tests.test_objectify.ObjectifyTestCase.XML
1166 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-364', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-365" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-365', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1167 <a name="L309"></a><tt class="py-lineno"> 309</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-366" class="py-name"><a title="lxml.etree
1168 lxml.sax.ElementTreeContentHandler.etree
1169 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1170 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1171 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-366', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-367" class="py-name"><a title="lxml.etree.strip_elements" class="py-name" href="#" onclick="return doclink('link-367', 'strip_elements', 'link-317');">strip_elements</a></tt><tt class="py-op">(</tt><tt id="link-368" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-368', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'{urn:a}*'</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
1172 <a name="L310"></a><tt class="py-lineno"> 310</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-369" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-369', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test>TEST<x>X<a>A<c xmlns="urn:x"></c>CT</a>AT</x>XT</test>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1173 <a name="L311"></a><tt class="py-lineno"> 311</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-370" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1174 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-370', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-371" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-371', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1175 <a name="L312"></a><tt class="py-lineno"> 312</tt> <tt class="py-line"> </tt>
1176 <a name="L313"></a><tt class="py-lineno"> 313</tt> <tt class="py-line"> <tt id="link-372" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-372', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-373" class="py-name"><a title="lxml.etree.XML
1178 lxml.tests.test_objectify.ObjectifyTestCase.XML
1179 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-373', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-374" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-374', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1180 <a name="L314"></a><tt class="py-lineno"> 314</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-375" class="py-name"><a title="lxml.etree
1181 lxml.sax.ElementTreeContentHandler.etree
1182 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1183 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1184 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-375', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-376" class="py-name"><a title="lxml.etree.strip_elements" class="py-name" href="#" onclick="return doclink('link-376', 'strip_elements', 'link-317');">strip_elements</a></tt><tt class="py-op">(</tt><tt id="link-377" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-377', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'{urn:a}*'</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">,</tt> <tt class="py-name">with_tail</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
1185 <a name="L315"></a><tt class="py-lineno"> 315</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-378" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-378', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test>TESTAT<x>X<a>ABT<c xmlns="urn:x"></c>CT</a>AT</x>XT</test>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1186 <a name="L316"></a><tt class="py-lineno"> 316</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-379" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1187 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-379', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-380" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-380', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1188 </div><a name="L317"></a><tt class="py-lineno"> 317</tt> <tt class="py-line"> </tt>
1189 <a name="ETreeOnlyTestCase.test_strip_tags"></a><div id="ETreeOnlyTestCase.test_strip_tags-def"><a name="L318"></a><tt class="py-lineno"> 318</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_strip_tags-toggle" onclick="return toggle('ETreeOnlyTestCase.test_strip_tags');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_strip_tags">test_strip_tags</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
1190 </div><div id="ETreeOnlyTestCase.test_strip_tags-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_strip_tags-expanded"><a name="L319"></a><tt class="py-lineno"> 319</tt> <tt class="py-line"> <tt id="link-381" class="py-name"><a title="lxml.etree.XML
1192 lxml.tests.test_objectify.ObjectifyTestCase.XML
1193 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-381', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-382" class="py-name"><a title="lxml.etree
1194 lxml.sax.ElementTreeContentHandler.etree
1195 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1196 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1197 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-382', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-383" class="py-name"><a title="lxml.etree.XML
1199 lxml.tests.test_objectify.ObjectifyTestCase.XML
1200 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-383', 'XML', 'link-217');">XML</a></tt> </tt>
1201 <a name="L320"></a><tt class="py-lineno"> 320</tt> <tt class="py-line"> <tt id="link-384" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-384', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-385" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-385', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test>TEST<a>A<b>B<c/>CT</b>BT</a>AT<x>X<a>A<b/>BT<c/>CT</a>AT</x>XT</test>'</tt><tt class="py-op">)</tt> </tt>
1202 <a name="L321"></a><tt class="py-lineno"> 321</tt> <tt class="py-line"> </tt>
1203 <a name="L322"></a><tt class="py-lineno"> 322</tt> <tt class="py-line"> <tt id="link-386" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-386', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-387" class="py-name"><a title="lxml.etree.XML
1205 lxml.tests.test_objectify.ObjectifyTestCase.XML
1206 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-387', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-388" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-388', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1207 <a name="L323"></a><tt class="py-lineno"> 323</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-389" class="py-name"><a title="lxml.etree
1208 lxml.sax.ElementTreeContentHandler.etree
1209 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1210 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1211 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-389', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-390" class="py-name" targets="Function lxml.etree.strip_tags()=lxml.etree-module.html#strip_tags"><a title="lxml.etree.strip_tags" class="py-name" href="#" onclick="return doclink('link-390', 'strip_tags', 'link-390');">strip_tags</a></tt><tt class="py-op">(</tt><tt id="link-391" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-391', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
1212 <a name="L324"></a><tt class="py-lineno"> 324</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-392" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-392', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test>TESTA<b>B<c></c>CT</b>BTAT<x>XA<b></b>BT<c></c>CTAT</x>XT</test>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1213 <a name="L325"></a><tt class="py-lineno"> 325</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-393" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1214 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-393', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-394" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-394', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1215 <a name="L326"></a><tt class="py-lineno"> 326</tt> <tt class="py-line"> </tt>
1216 <a name="L327"></a><tt class="py-lineno"> 327</tt> <tt class="py-line"> <tt id="link-395" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-395', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-396" class="py-name"><a title="lxml.etree.XML
1218 lxml.tests.test_objectify.ObjectifyTestCase.XML
1219 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-396', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-397" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-397', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1220 <a name="L328"></a><tt class="py-lineno"> 328</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-398" class="py-name"><a title="lxml.etree
1221 lxml.sax.ElementTreeContentHandler.etree
1222 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1223 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1224 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-398', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-399" class="py-name"><a title="lxml.etree.strip_tags" class="py-name" href="#" onclick="return doclink('link-399', 'strip_tags', 'link-390');">strip_tags</a></tt><tt class="py-op">(</tt><tt id="link-400" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-400', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">,</tt> <tt class="py-string">'X'</tt><tt class="py-op">,</tt> <tt class="py-string">'Y'</tt><tt class="py-op">,</tt> <tt class="py-string">'Z'</tt><tt class="py-op">)</tt> </tt>
1225 <a name="L329"></a><tt class="py-lineno"> 329</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-401" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-401', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test>TEST<a>ABCTBT</a>AT<x>X<a>ABTCT</a>AT</x>XT</test>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1226 <a name="L330"></a><tt class="py-lineno"> 330</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-402" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1227 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-402', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-403" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-403', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1228 <a name="L331"></a><tt class="py-lineno"> 331</tt> <tt class="py-line"> </tt>
1229 <a name="L332"></a><tt class="py-lineno"> 332</tt> <tt class="py-line"> <tt id="link-404" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-404', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-405" class="py-name"><a title="lxml.etree.XML
1231 lxml.tests.test_objectify.ObjectifyTestCase.XML
1232 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-405', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-406" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-406', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1233 <a name="L333"></a><tt class="py-lineno"> 333</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-407" class="py-name"><a title="lxml.etree
1234 lxml.sax.ElementTreeContentHandler.etree
1235 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1236 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1237 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-407', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-408" class="py-name"><a title="lxml.etree.strip_tags" class="py-name" href="#" onclick="return doclink('link-408', 'strip_tags', 'link-390');">strip_tags</a></tt><tt class="py-op">(</tt><tt id="link-409" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-409', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
1238 <a name="L334"></a><tt class="py-lineno"> 334</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-410" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-410', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test>TEST<a>A<b>BCT</b>BT</a>AT<x>X<a>A<b></b>BTCT</a>AT</x>XT</test>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1239 <a name="L335"></a><tt class="py-lineno"> 335</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-411" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1240 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-411', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-412" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-412', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1241 </div><a name="L336"></a><tt class="py-lineno"> 336</tt> <tt class="py-line"> </tt>
1242 <a name="ETreeOnlyTestCase.test_strip_tags_pi_comment"></a><div id="ETreeOnlyTestCase.test_strip_tags_pi_comment-def"><a name="L337"></a><tt class="py-lineno"> 337</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_strip_tags_pi_comment-toggle" onclick="return toggle('ETreeOnlyTestCase.test_strip_tags_pi_comment');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_strip_tags_pi_comment">test_strip_tags_pi_comment</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
1243 </div><div id="ETreeOnlyTestCase.test_strip_tags_pi_comment-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_strip_tags_pi_comment-expanded"><a name="L338"></a><tt class="py-lineno"> 338</tt> <tt class="py-line"> <tt id="link-413" class="py-name"><a title="lxml.etree.XML
1245 lxml.tests.test_objectify.ObjectifyTestCase.XML
1246 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-413', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-414" class="py-name"><a title="lxml.etree
1247 lxml.sax.ElementTreeContentHandler.etree
1248 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1249 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1250 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-414', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-415" class="py-name"><a title="lxml.etree.XML
1252 lxml.tests.test_objectify.ObjectifyTestCase.XML
1253 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-415', 'XML', 'link-217');">XML</a></tt> </tt>
1254 <a name="L339"></a><tt class="py-lineno"> 339</tt> <tt class="py-line"> <tt id="link-416" class="py-name" targets="Function lxml.etree.PI()=lxml.etree-module.html#PI"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-416', 'PI', 'link-416');">PI</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-417" class="py-name"><a title="lxml.etree
1255 lxml.sax.ElementTreeContentHandler.etree
1256 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1257 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1258 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-417', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt class="py-name">ProcessingInstruction</tt> </tt>
1259 <a name="L340"></a><tt class="py-lineno"> 340</tt> <tt class="py-line"> <tt id="link-418" class="py-name" targets="Function lxml.etree.Comment()=lxml.etree-module.html#Comment"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-418', 'Comment', 'link-418');">Comment</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-419" class="py-name"><a title="lxml.etree
1260 lxml.sax.ElementTreeContentHandler.etree
1261 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1262 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1263 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-419', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-420" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-420', 'Comment', 'link-418');">Comment</a></tt> </tt>
1264 <a name="L341"></a><tt class="py-lineno"> 341</tt> <tt class="py-line"> <tt id="link-421" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-421', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-422" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-422', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!--comment1-->\n<?PI1?>\n<test>TEST<!--comment2-->XT<?PI2?></test>\n<!--comment3-->\n<?PI1?>'</tt><tt class="py-op">)</tt> </tt>
1265 <a name="L342"></a><tt class="py-lineno"> 342</tt> <tt class="py-line"> </tt>
1266 <a name="L343"></a><tt class="py-lineno"> 343</tt> <tt class="py-line"> <tt id="link-423" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-423', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-424" class="py-name"><a title="lxml.etree.XML
1268 lxml.tests.test_objectify.ObjectifyTestCase.XML
1269 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-424', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-425" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-425', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1270 <a name="L344"></a><tt class="py-lineno"> 344</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-426" class="py-name"><a title="lxml.etree
1271 lxml.sax.ElementTreeContentHandler.etree
1272 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1273 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1274 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-426', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-427" class="py-name"><a title="lxml.etree.strip_tags" class="py-name" href="#" onclick="return doclink('link-427', 'strip_tags', 'link-390');">strip_tags</a></tt><tt class="py-op">(</tt><tt id="link-428" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-428', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt id="link-429" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-429', 'PI', 'link-416');">PI</a></tt><tt class="py-op">)</tt> </tt>
1275 <a name="L345"></a><tt class="py-lineno"> 345</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-430" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-430', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!--comment1-->\n<?PI1?>\n<test>TEST<!--comment2-->XT</test>\n<!--comment3-->\n<?PI1?>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1276 <a name="L346"></a><tt class="py-lineno"> 346</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-431" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1277 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-431', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-432" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-432', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1278 <a name="L347"></a><tt class="py-lineno"> 347</tt> <tt class="py-line"> </tt>
1279 <a name="L348"></a><tt class="py-lineno"> 348</tt> <tt class="py-line"> <tt id="link-433" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-433', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-434" class="py-name"><a title="lxml.etree.XML
1281 lxml.tests.test_objectify.ObjectifyTestCase.XML
1282 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-434', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-435" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-435', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1283 <a name="L349"></a><tt class="py-lineno"> 349</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-436" class="py-name"><a title="lxml.etree
1284 lxml.sax.ElementTreeContentHandler.etree
1285 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1286 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1287 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-436', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-437" class="py-name"><a title="lxml.etree.strip_tags" class="py-name" href="#" onclick="return doclink('link-437', 'strip_tags', 'link-390');">strip_tags</a></tt><tt class="py-op">(</tt><tt id="link-438" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-438', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt id="link-439" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-439', 'Comment', 'link-418');">Comment</a></tt><tt class="py-op">)</tt> </tt>
1288 <a name="L350"></a><tt class="py-lineno"> 350</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-440" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-440', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!--comment1-->\n<?PI1?>\n<test>TESTXT<?PI2?></test>\n<!--comment3-->\n<?PI1?>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1289 <a name="L351"></a><tt class="py-lineno"> 351</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-441" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1290 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-441', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-442" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-442', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1291 <a name="L352"></a><tt class="py-lineno"> 352</tt> <tt class="py-line"> </tt>
1292 <a name="L353"></a><tt class="py-lineno"> 353</tt> <tt class="py-line"> <tt id="link-443" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-443', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-444" class="py-name"><a title="lxml.etree.XML
1294 lxml.tests.test_objectify.ObjectifyTestCase.XML
1295 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-444', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-445" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-445', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1296 <a name="L354"></a><tt class="py-lineno"> 354</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-446" class="py-name"><a title="lxml.etree
1297 lxml.sax.ElementTreeContentHandler.etree
1298 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1299 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1300 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-446', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-447" class="py-name"><a title="lxml.etree.strip_tags" class="py-name" href="#" onclick="return doclink('link-447', 'strip_tags', 'link-390');">strip_tags</a></tt><tt class="py-op">(</tt><tt id="link-448" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-448', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt id="link-449" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-449', 'PI', 'link-416');">PI</a></tt><tt class="py-op">,</tt> <tt id="link-450" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-450', 'Comment', 'link-418');">Comment</a></tt><tt class="py-op">)</tt> </tt>
1301 <a name="L355"></a><tt class="py-lineno"> 355</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-451" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-451', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!--comment1-->\n<?PI1?>\n<test>TESTXT</test>\n<!--comment3-->\n<?PI1?>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1302 <a name="L356"></a><tt class="py-lineno"> 356</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-452" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1303 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-452', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-453" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-453', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1304 <a name="L357"></a><tt class="py-lineno"> 357</tt> <tt class="py-line"> </tt>
1305 <a name="L358"></a><tt class="py-lineno"> 358</tt> <tt class="py-line"> <tt id="link-454" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-454', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-455" class="py-name"><a title="lxml.etree.XML
1307 lxml.tests.test_objectify.ObjectifyTestCase.XML
1308 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-455', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-456" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-456', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1309 <a name="L359"></a><tt class="py-lineno"> 359</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-457" class="py-name"><a title="lxml.etree
1310 lxml.sax.ElementTreeContentHandler.etree
1311 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1312 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1313 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-457', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-458" class="py-name"><a title="lxml.etree.strip_tags" class="py-name" href="#" onclick="return doclink('link-458', 'strip_tags', 'link-390');">strip_tags</a></tt><tt class="py-op">(</tt><tt id="link-459" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-459', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt id="link-460" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-460', 'Comment', 'link-418');">Comment</a></tt><tt class="py-op">,</tt> <tt id="link-461" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-461', 'PI', 'link-416');">PI</a></tt><tt class="py-op">)</tt> </tt>
1314 <a name="L360"></a><tt class="py-lineno"> 360</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-462" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-462', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!--comment1-->\n<?PI1?>\n<test>TESTXT</test>\n<!--comment3-->\n<?PI1?>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1315 <a name="L361"></a><tt class="py-lineno"> 361</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-463" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1316 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-463', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-464" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-464', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1317 </div><a name="L362"></a><tt class="py-lineno"> 362</tt> <tt class="py-line"> </tt>
1318 <a name="ETreeOnlyTestCase.test_strip_tags_pi_comment_all"></a><div id="ETreeOnlyTestCase.test_strip_tags_pi_comment_all-def"><a name="L363"></a><tt class="py-lineno"> 363</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_strip_tags_pi_comment_all-toggle" onclick="return toggle('ETreeOnlyTestCase.test_strip_tags_pi_comment_all');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_strip_tags_pi_comment_all">test_strip_tags_pi_comment_all</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
1319 </div><div id="ETreeOnlyTestCase.test_strip_tags_pi_comment_all-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_strip_tags_pi_comment_all-expanded"><a name="L364"></a><tt class="py-lineno"> 364</tt> <tt class="py-line"> <tt id="link-465" class="py-name"><a title="lxml.etree.XML
1321 lxml.tests.test_objectify.ObjectifyTestCase.XML
1322 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-465', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-466" class="py-name"><a title="lxml.etree
1323 lxml.sax.ElementTreeContentHandler.etree
1324 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1325 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1326 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-466', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-467" class="py-name"><a title="lxml.etree.XML
1328 lxml.tests.test_objectify.ObjectifyTestCase.XML
1329 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-467', 'XML', 'link-217');">XML</a></tt> </tt>
1330 <a name="L365"></a><tt class="py-lineno"> 365</tt> <tt class="py-line"> <tt id="link-468" class="py-name" targets="Function lxml.etree.ElementTree()=lxml.etree-module.html#ElementTree,Module xml.etree.ElementTree=xml.etree.ElementTree-module.html,Class xml.etree.ElementTree.ElementTree=xml.etree.ElementTree.ElementTree-class.html"><a title="lxml.etree.ElementTree
1331 xml.etree.ElementTree
1332 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-468', 'ElementTree', 'link-468');">ElementTree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-469" class="py-name"><a title="lxml.etree
1333 lxml.sax.ElementTreeContentHandler.etree
1334 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1335 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1336 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-469', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-470" class="py-name"><a title="lxml.etree.ElementTree
1337 xml.etree.ElementTree
1338 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-470', 'ElementTree', 'link-468');">ElementTree</a></tt> </tt>
1339 <a name="L366"></a><tt class="py-lineno"> 366</tt> <tt class="py-line"> <tt id="link-471" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-471', 'PI', 'link-416');">PI</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-472" class="py-name"><a title="lxml.etree
1340 lxml.sax.ElementTreeContentHandler.etree
1341 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1342 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1343 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-472', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt class="py-name">ProcessingInstruction</tt> </tt>
1344 <a name="L367"></a><tt class="py-lineno"> 367</tt> <tt class="py-line"> <tt id="link-473" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-473', 'Comment', 'link-418');">Comment</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-474" class="py-name"><a title="lxml.etree
1345 lxml.sax.ElementTreeContentHandler.etree
1346 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1347 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1348 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-474', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-475" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-475', 'Comment', 'link-418');">Comment</a></tt> </tt>
1349 <a name="L368"></a><tt class="py-lineno"> 368</tt> <tt class="py-line"> <tt id="link-476" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-476', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-477" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-477', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!--comment1-->\n<?PI1?>\n<test>TEST<!--comment2-->XT<?PI2?></test>\n<!--comment3-->\n<?PI1?>'</tt><tt class="py-op">)</tt> </tt>
1350 <a name="L369"></a><tt class="py-lineno"> 369</tt> <tt class="py-line"> </tt>
1351 <a name="L370"></a><tt class="py-lineno"> 370</tt> <tt class="py-line"> <tt id="link-478" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-478', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-479" class="py-name"><a title="lxml.etree.XML
1353 lxml.tests.test_objectify.ObjectifyTestCase.XML
1354 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-479', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-480" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-480', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1355 <a name="L371"></a><tt class="py-lineno"> 371</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-481" class="py-name"><a title="lxml.etree
1356 lxml.sax.ElementTreeContentHandler.etree
1357 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1358 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1359 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-481', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-482" class="py-name"><a title="lxml.etree.strip_tags" class="py-name" href="#" onclick="return doclink('link-482', 'strip_tags', 'link-390');">strip_tags</a></tt><tt class="py-op">(</tt><tt id="link-483" class="py-name"><a title="lxml.etree.ElementTree
1360 xml.etree.ElementTree
1361 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-483', 'ElementTree', 'link-468');">ElementTree</a></tt><tt class="py-op">(</tt><tt id="link-484" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-484', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-485" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-485', 'PI', 'link-416');">PI</a></tt><tt class="py-op">)</tt> </tt>
1362 <a name="L372"></a><tt class="py-lineno"> 372</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-486" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-486', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!--comment1-->\n<test>TEST<!--comment2-->XT</test>\n<!--comment3-->'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1363 <a name="L373"></a><tt class="py-lineno"> 373</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-487" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1364 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-487', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-488" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-488', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1365 <a name="L374"></a><tt class="py-lineno"> 374</tt> <tt class="py-line"> </tt>
1366 <a name="L375"></a><tt class="py-lineno"> 375</tt> <tt class="py-line"> <tt id="link-489" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-489', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-490" class="py-name"><a title="lxml.etree.XML
1368 lxml.tests.test_objectify.ObjectifyTestCase.XML
1369 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-490', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-491" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-491', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1370 <a name="L376"></a><tt class="py-lineno"> 376</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-492" class="py-name"><a title="lxml.etree
1371 lxml.sax.ElementTreeContentHandler.etree
1372 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1373 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1374 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-492', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-493" class="py-name"><a title="lxml.etree.strip_tags" class="py-name" href="#" onclick="return doclink('link-493', 'strip_tags', 'link-390');">strip_tags</a></tt><tt class="py-op">(</tt><tt id="link-494" class="py-name"><a title="lxml.etree.ElementTree
1375 xml.etree.ElementTree
1376 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-494', 'ElementTree', 'link-468');">ElementTree</a></tt><tt class="py-op">(</tt><tt id="link-495" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-495', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-496" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-496', 'Comment', 'link-418');">Comment</a></tt><tt class="py-op">)</tt> </tt>
1377 <a name="L377"></a><tt class="py-lineno"> 377</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-497" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-497', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<?PI1?>\n<test>TESTXT<?PI2?></test>\n<?PI1?>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1378 <a name="L378"></a><tt class="py-lineno"> 378</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-498" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1379 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-498', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-499" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-499', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1380 <a name="L379"></a><tt class="py-lineno"> 379</tt> <tt class="py-line"> </tt>
1381 <a name="L380"></a><tt class="py-lineno"> 380</tt> <tt class="py-line"> <tt id="link-500" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-500', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-501" class="py-name"><a title="lxml.etree.XML
1383 lxml.tests.test_objectify.ObjectifyTestCase.XML
1384 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-501', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-502" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-502', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1385 <a name="L381"></a><tt class="py-lineno"> 381</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-503" class="py-name"><a title="lxml.etree
1386 lxml.sax.ElementTreeContentHandler.etree
1387 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1388 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1389 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-503', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-504" class="py-name"><a title="lxml.etree.strip_tags" class="py-name" href="#" onclick="return doclink('link-504', 'strip_tags', 'link-390');">strip_tags</a></tt><tt class="py-op">(</tt><tt id="link-505" class="py-name"><a title="lxml.etree.ElementTree
1390 xml.etree.ElementTree
1391 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-505', 'ElementTree', 'link-468');">ElementTree</a></tt><tt class="py-op">(</tt><tt id="link-506" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-506', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-507" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-507', 'PI', 'link-416');">PI</a></tt><tt class="py-op">,</tt> <tt id="link-508" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-508', 'Comment', 'link-418');">Comment</a></tt><tt class="py-op">)</tt> </tt>
1392 <a name="L382"></a><tt class="py-lineno"> 382</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-509" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-509', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test>TESTXT</test>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1393 <a name="L383"></a><tt class="py-lineno"> 383</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-510" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1394 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-510', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-511" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-511', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1395 <a name="L384"></a><tt class="py-lineno"> 384</tt> <tt class="py-line"> </tt>
1396 <a name="L385"></a><tt class="py-lineno"> 385</tt> <tt class="py-line"> <tt id="link-512" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-512', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-513" class="py-name"><a title="lxml.etree.XML
1398 lxml.tests.test_objectify.ObjectifyTestCase.XML
1399 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-513', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-514" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-514', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1400 <a name="L386"></a><tt class="py-lineno"> 386</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-515" class="py-name"><a title="lxml.etree
1401 lxml.sax.ElementTreeContentHandler.etree
1402 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1403 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1404 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-515', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-516" class="py-name"><a title="lxml.etree.strip_tags" class="py-name" href="#" onclick="return doclink('link-516', 'strip_tags', 'link-390');">strip_tags</a></tt><tt class="py-op">(</tt><tt id="link-517" class="py-name"><a title="lxml.etree.ElementTree
1405 xml.etree.ElementTree
1406 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-517', 'ElementTree', 'link-468');">ElementTree</a></tt><tt class="py-op">(</tt><tt id="link-518" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-518', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-519" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-519', 'Comment', 'link-418');">Comment</a></tt><tt class="py-op">,</tt> <tt id="link-520" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-520', 'PI', 'link-416');">PI</a></tt><tt class="py-op">)</tt> </tt>
1407 <a name="L387"></a><tt class="py-lineno"> 387</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-521" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-521', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test>TESTXT</test>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1408 <a name="L388"></a><tt class="py-lineno"> 388</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-522" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1409 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-522', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-523" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-523', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1410 </div><a name="L389"></a><tt class="py-lineno"> 389</tt> <tt class="py-line"> </tt>
1411 <a name="ETreeOnlyTestCase.test_strip_tags_doc_style"></a><div id="ETreeOnlyTestCase.test_strip_tags_doc_style-def"><a name="L390"></a><tt class="py-lineno"> 390</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_strip_tags_doc_style-toggle" onclick="return toggle('ETreeOnlyTestCase.test_strip_tags_doc_style');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_strip_tags_doc_style">test_strip_tags_doc_style</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
1412 </div><div id="ETreeOnlyTestCase.test_strip_tags_doc_style-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_strip_tags_doc_style-expanded"><a name="L391"></a><tt class="py-lineno"> 391</tt> <tt class="py-line"> <tt id="link-524" class="py-name"><a title="lxml.etree.XML
1414 lxml.tests.test_objectify.ObjectifyTestCase.XML
1415 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-524', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-525" class="py-name"><a title="lxml.etree
1416 lxml.sax.ElementTreeContentHandler.etree
1417 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1418 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1419 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-525', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-526" class="py-name"><a title="lxml.etree.XML
1421 lxml.tests.test_objectify.ObjectifyTestCase.XML
1422 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-526', 'XML', 'link-217');">XML</a></tt> </tt>
1423 <a name="L392"></a><tt class="py-lineno"> 392</tt> <tt class="py-line"> <tt id="link-527" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-527', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-528" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-528', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'''</tt> </tt>
1424 <a name="L393"></a><tt class="py-lineno"> 393</tt> <tt class="py-line"><tt class="py-string"> <div></tt> </tt>
1425 <a name="L394"></a><tt class="py-lineno"> 394</tt> <tt class="py-line"><tt class="py-string"> <div></tt> </tt>
1426 <a name="L395"></a><tt class="py-lineno"> 395</tt> <tt class="py-line"><tt class="py-string"> I like <strong>sheep</strong>.</tt> </tt>
1427 <a name="L396"></a><tt class="py-lineno"> 396</tt> <tt class="py-line"><tt class="py-string"> <br/></tt> </tt>
1428 <a name="L397"></a><tt class="py-lineno"> 397</tt> <tt class="py-line"><tt class="py-string"> I like lots of <strong>sheep</strong>.</tt> </tt>
1429 <a name="L398"></a><tt class="py-lineno"> 398</tt> <tt class="py-line"><tt class="py-string"> <br/></tt> </tt>
1430 <a name="L399"></a><tt class="py-lineno"> 399</tt> <tt class="py-line"><tt class="py-string"> Click <a href="http://www.sheep.com">here</a> for <a href="http://www.sheep.com">those</a> sheep.</tt> </tt>
1431 <a name="L400"></a><tt class="py-lineno"> 400</tt> <tt class="py-line"><tt class="py-string"> <br/></tt> </tt>
1432 <a name="L401"></a><tt class="py-lineno"> 401</tt> <tt class="py-line"><tt class="py-string"> </div></tt> </tt>
1433 <a name="L402"></a><tt class="py-lineno"> 402</tt> <tt class="py-line"><tt class="py-string"> </div></tt> </tt>
1434 <a name="L403"></a><tt class="py-lineno"> 403</tt> <tt class="py-line"><tt class="py-string"> '''</tt><tt class="py-op">.</tt><tt id="link-529" class="py-name" targets="Function lxml.doctestcompare.strip()=lxml.doctestcompare-module.html#strip"><a title="lxml.doctestcompare.strip" class="py-name" href="#" onclick="return doclink('link-529', 'strip', 'link-529');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1435 <a name="L404"></a><tt class="py-lineno"> 404</tt> <tt class="py-line"> </tt>
1436 <a name="L405"></a><tt class="py-lineno"> 405</tt> <tt class="py-line"> <tt id="link-530" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-530', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-531" class="py-name"><a title="lxml.etree.XML
1438 lxml.tests.test_objectify.ObjectifyTestCase.XML
1439 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-531', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-532" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-532', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1440 <a name="L406"></a><tt class="py-lineno"> 406</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-533" class="py-name"><a title="lxml.etree
1441 lxml.sax.ElementTreeContentHandler.etree
1442 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1443 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1444 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-533', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-534" class="py-name"><a title="lxml.etree.strip_tags" class="py-name" href="#" onclick="return doclink('link-534', 'strip_tags', 'link-390');">strip_tags</a></tt><tt class="py-op">(</tt><tt id="link-535" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-535', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
1445 <a name="L407"></a><tt class="py-lineno"> 407</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt id="link-536" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-536', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'</?a[^>]*>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-537" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-537', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-538" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-538', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-539" class="py-name" targets="Method lxml.etree._Element.replace()=lxml.etree._Element-class.html#replace,Method lxml.etree._ExsltRegExp.replace()=lxml.etree._ExsltRegExp-class.html#replace"><a title="lxml.etree._Element.replace
1446 lxml.etree._ExsltRegExp.replace" class="py-name" href="#" onclick="return doclink('link-539', 'replace', 'link-539');">replace</a></tt><tt class="py-op">(</tt><tt id="link-540" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-540', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<br/>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-541" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-541', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<br></br>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1447 <a name="L408"></a><tt class="py-lineno"> 408</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-542" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1448 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-542', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-543" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-543', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1449 <a name="L409"></a><tt class="py-lineno"> 409</tt> <tt class="py-line"> </tt>
1450 <a name="L410"></a><tt class="py-lineno"> 410</tt> <tt class="py-line"> <tt id="link-544" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-544', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-545" class="py-name"><a title="lxml.etree.XML
1452 lxml.tests.test_objectify.ObjectifyTestCase.XML
1453 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-545', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-546" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-546', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1454 <a name="L411"></a><tt class="py-lineno"> 411</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-547" class="py-name"><a title="lxml.etree
1455 lxml.sax.ElementTreeContentHandler.etree
1456 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1457 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1458 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-547', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-548" class="py-name"><a title="lxml.etree.strip_tags" class="py-name" href="#" onclick="return doclink('link-548', 'strip_tags', 'link-390');">strip_tags</a></tt><tt class="py-op">(</tt><tt id="link-549" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-549', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">,</tt> <tt class="py-string">'br'</tt><tt class="py-op">)</tt> </tt>
1459 <a name="L412"></a><tt class="py-lineno"> 412</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt id="link-550" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-550', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'</?a[^>]*>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-551" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-551', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1460 <a name="L413"></a><tt class="py-lineno"> 413</tt> <tt class="py-line"> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt id="link-552" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-552', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<br[^>]*>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-553" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-553', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-554" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-554', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1461 <a name="L414"></a><tt class="py-lineno"> 414</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-555" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1462 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-555', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-556" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-556', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1463 </div><a name="L415"></a><tt class="py-lineno"> 415</tt> <tt class="py-line"> </tt>
1464 <a name="ETreeOnlyTestCase.test_strip_tags_ns"></a><div id="ETreeOnlyTestCase.test_strip_tags_ns-def"><a name="L416"></a><tt class="py-lineno"> 416</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_strip_tags_ns-toggle" onclick="return toggle('ETreeOnlyTestCase.test_strip_tags_ns');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_strip_tags_ns">test_strip_tags_ns</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
1465 </div><div id="ETreeOnlyTestCase.test_strip_tags_ns-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_strip_tags_ns-expanded"><a name="L417"></a><tt class="py-lineno"> 417</tt> <tt class="py-line"> <tt id="link-557" class="py-name"><a title="lxml.etree.XML
1467 lxml.tests.test_objectify.ObjectifyTestCase.XML
1468 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-557', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-558" class="py-name"><a title="lxml.etree
1469 lxml.sax.ElementTreeContentHandler.etree
1470 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1471 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1472 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-558', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-559" class="py-name"><a title="lxml.etree.XML
1474 lxml.tests.test_objectify.ObjectifyTestCase.XML
1475 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-559', 'XML', 'link-217');">XML</a></tt> </tt>
1476 <a name="L418"></a><tt class="py-lineno"> 418</tt> <tt class="py-line"> <tt id="link-560" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-560', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-561" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-561', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test>TEST<n:a xmlns:n="urn:a">A<b>B<c xmlns="urn:c"/>CT</b>BT</n:a>AT<x>X<a>A<b xmlns="urn:a"/>BT<c xmlns="urn:x"/>CT</a>AT</x>XT</test>'</tt><tt class="py-op">)</tt> </tt>
1477 <a name="L419"></a><tt class="py-lineno"> 419</tt> <tt class="py-line"> </tt>
1478 <a name="L420"></a><tt class="py-lineno"> 420</tt> <tt class="py-line"> <tt id="link-562" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-562', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-563" class="py-name"><a title="lxml.etree.XML
1480 lxml.tests.test_objectify.ObjectifyTestCase.XML
1481 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-563', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-564" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-564', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1482 <a name="L421"></a><tt class="py-lineno"> 421</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-565" class="py-name"><a title="lxml.etree
1483 lxml.sax.ElementTreeContentHandler.etree
1484 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1485 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1486 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-565', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-566" class="py-name"><a title="lxml.etree.strip_tags" class="py-name" href="#" onclick="return doclink('link-566', 'strip_tags', 'link-390');">strip_tags</a></tt><tt class="py-op">(</tt><tt id="link-567" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-567', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
1487 <a name="L422"></a><tt class="py-lineno"> 422</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-568" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-568', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test>TEST<n:a xmlns:n="urn:a">A<b>B<c xmlns="urn:c"></c>CT</b>BT</n:a>AT<x>XA<b xmlns="urn:a"></b>BT<c xmlns="urn:x"></c>CTAT</x>XT</test>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1488 <a name="L423"></a><tt class="py-lineno"> 423</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-569" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1489 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-569', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-570" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-570', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1490 <a name="L424"></a><tt class="py-lineno"> 424</tt> <tt class="py-line"> </tt>
1491 <a name="L425"></a><tt class="py-lineno"> 425</tt> <tt class="py-line"> <tt id="link-571" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-571', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-572" class="py-name"><a title="lxml.etree.XML
1493 lxml.tests.test_objectify.ObjectifyTestCase.XML
1494 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-572', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-573" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-573', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1495 <a name="L426"></a><tt class="py-lineno"> 426</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-574" class="py-name"><a title="lxml.etree
1496 lxml.sax.ElementTreeContentHandler.etree
1497 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1498 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1499 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-574', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-575" class="py-name"><a title="lxml.etree.strip_tags" class="py-name" href="#" onclick="return doclink('link-575', 'strip_tags', 'link-390');">strip_tags</a></tt><tt class="py-op">(</tt><tt id="link-576" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-576', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'{urn:a}b'</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
1500 <a name="L427"></a><tt class="py-lineno"> 427</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-577" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-577', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test>TEST<n:a xmlns:n="urn:a">A<b>B<c xmlns="urn:c"></c>CT</b>BT</n:a>AT<x>X<a>ABT<c xmlns="urn:x"></c>CT</a>AT</x>XT</test>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1501 <a name="L428"></a><tt class="py-lineno"> 428</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-578" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1502 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-578', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-579" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-579', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1503 <a name="L429"></a><tt class="py-lineno"> 429</tt> <tt class="py-line"> </tt>
1504 <a name="L430"></a><tt class="py-lineno"> 430</tt> <tt class="py-line"> <tt id="link-580" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-580', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-581" class="py-name"><a title="lxml.etree.XML
1506 lxml.tests.test_objectify.ObjectifyTestCase.XML
1507 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-581', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-582" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-582', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1508 <a name="L431"></a><tt class="py-lineno"> 431</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-583" class="py-name"><a title="lxml.etree
1509 lxml.sax.ElementTreeContentHandler.etree
1510 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1511 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1512 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-583', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-584" class="py-name"><a title="lxml.etree.strip_tags" class="py-name" href="#" onclick="return doclink('link-584', 'strip_tags', 'link-390');">strip_tags</a></tt><tt class="py-op">(</tt><tt id="link-585" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-585', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'{urn:a}*'</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
1513 <a name="L432"></a><tt class="py-lineno"> 432</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-586" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-586', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<test>TESTA<b>B<c xmlns="urn:c"></c>CT</b>BTAT<x>X<a>ABT<c xmlns="urn:x"></c>CT</a>AT</x>XT</test>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1514 <a name="L433"></a><tt class="py-lineno"> 433</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-587" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
1515 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-587', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-588" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-588', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1516 </div><a name="L434"></a><tt class="py-lineno"> 434</tt> <tt class="py-line"> </tt>
1517 <a name="ETreeOnlyTestCase.test_strip_tags_and_remove"></a><div id="ETreeOnlyTestCase.test_strip_tags_and_remove-def"><a name="L435"></a><tt class="py-lineno"> 435</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_strip_tags_and_remove-toggle" onclick="return toggle('ETreeOnlyTestCase.test_strip_tags_and_remove');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_strip_tags_and_remove">test_strip_tags_and_remove</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
1518 </div><div id="ETreeOnlyTestCase.test_strip_tags_and_remove-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_strip_tags_and_remove-expanded"><a name="L436"></a><tt class="py-lineno"> 436</tt> <tt class="py-line"> <tt class="py-comment"># previously crashed</tt> </tt>
1519 <a name="L437"></a><tt class="py-lineno"> 437</tt> <tt class="py-line"> <tt id="link-589" class="py-name" targets="Variable lxml.etree.ErrorDomains.HTML=lxml.etree.ErrorDomains-class.html#HTML,Function lxml.etree.HTML()=lxml.etree-module.html#HTML,Variable lxml.html.builder.HTML=lxml.html.builder-module.html#HTML"><a title="lxml.etree.ErrorDomains.HTML
1521 lxml.html.builder.HTML" class="py-name" href="#" onclick="return doclink('link-589', 'HTML', 'link-589');">HTML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-590" class="py-name"><a title="lxml.etree
1522 lxml.sax.ElementTreeContentHandler.etree
1523 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1524 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1525 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-590', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-591" class="py-name"><a title="lxml.etree.ErrorDomains.HTML
1527 lxml.html.builder.HTML" class="py-name" href="#" onclick="return doclink('link-591', 'HTML', 'link-589');">HTML</a></tt> </tt>
1528 <a name="L438"></a><tt class="py-lineno"> 438</tt> <tt class="py-line"> <tt id="link-592" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-592', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-593" class="py-name"><a title="lxml.etree.ErrorDomains.HTML
1530 lxml.html.builder.HTML" class="py-name" href="#" onclick="return doclink('link-593', 'HTML', 'link-589');">HTML</a></tt><tt class="py-op">(</tt><tt id="link-594" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-594', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<div><h1>title</h1> <b>foo</b> <p>boo</p></div>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
1531 <a name="L439"></a><tt class="py-lineno"> 439</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-595" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-595', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<div><h1>title</h1> <b>foo</b> <p>boo</p></div>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1532 <a name="L440"></a><tt class="py-lineno"> 440</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-596" class="py-name"><a title="lxml.etree
1533 lxml.sax.ElementTreeContentHandler.etree
1534 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1535 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1536 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-596', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-597" class="py-name" targets="Method lxml.etree.XSLT.tostring()=lxml.etree.XSLT-class.html#tostring,Function lxml.etree.tostring()=lxml.etree-module.html#tostring,Function lxml.html.tostring()=lxml.html-module.html#tostring"><a title="lxml.etree.XSLT.tostring
1538 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-597', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt id="link-598" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-598', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1539 <a name="L441"></a><tt class="py-lineno"> 441</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-599" class="py-name"><a title="lxml.etree
1540 lxml.sax.ElementTreeContentHandler.etree
1541 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1542 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1543 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-599', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-600" class="py-name"><a title="lxml.etree.strip_tags" class="py-name" href="#" onclick="return doclink('link-600', 'strip_tags', 'link-390');">strip_tags</a></tt><tt class="py-op">(</tt><tt id="link-601" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-601', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
1544 <a name="L442"></a><tt class="py-lineno"> 442</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-602" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-602', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<div><h1>title</h1> foo <p>boo</p></div>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1545 <a name="L443"></a><tt class="py-lineno"> 443</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-603" class="py-name"><a title="lxml.etree
1546 lxml.sax.ElementTreeContentHandler.etree
1547 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1548 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1549 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-603', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-604" class="py-name"><a title="lxml.etree.XSLT.tostring
1551 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-604', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt id="link-605" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-605', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1552 <a name="L444"></a><tt class="py-lineno"> 444</tt> <tt class="py-line"> <tt id="link-606" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-606', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-607" class="py-name" targets="Method lxml.etree._Element.remove()=lxml.etree._Element-class.html#remove,Method lxml.etree._ResolverRegistry.remove()=lxml.etree._ResolverRegistry-class.html#remove,Method lxml.html.CheckboxValues.remove()=lxml.html.CheckboxValues-class.html#remove,Method lxml.html.MultipleSelectOptions.remove()=lxml.html.MultipleSelectOptions-class.html#remove"><a title="lxml.etree._Element.remove
1553 lxml.etree._ResolverRegistry.remove
1554 lxml.html.CheckboxValues.remove
1555 lxml.html.MultipleSelectOptions.remove" class="py-name" href="#" onclick="return doclink('link-607', 'remove', 'link-607');">remove</a></tt><tt class="py-op">(</tt><tt id="link-608" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-608', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
1556 <a name="L445"></a><tt class="py-lineno"> 445</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-609" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-609', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<div><p>boo</p></div>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1557 <a name="L446"></a><tt class="py-lineno"> 446</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-610" class="py-name"><a title="lxml.etree
1558 lxml.sax.ElementTreeContentHandler.etree
1559 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1560 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1561 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-610', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-611" class="py-name"><a title="lxml.etree.XSLT.tostring
1563 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-611', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt id="link-612" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-612', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1564 </div><a name="L447"></a><tt class="py-lineno"> 447</tt> <tt class="py-line"> </tt>
1565 <a name="ETreeOnlyTestCase.test_pi"></a><div id="ETreeOnlyTestCase.test_pi-def"><a name="L448"></a><tt class="py-lineno"> 448</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_pi-toggle" onclick="return toggle('ETreeOnlyTestCase.test_pi');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_pi">test_pi</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
1566 </div><div id="ETreeOnlyTestCase.test_pi-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_pi-expanded"><a name="L449"></a><tt class="py-lineno"> 449</tt> <tt class="py-line"> <tt class="py-comment"># lxml.etree separates target and text</tt> </tt>
1567 <a name="L450"></a><tt class="py-lineno"> 450</tt> <tt class="py-line"> <tt id="link-613" class="py-name"><a title="lxml.cssselect.Element
1570 lxml.objectify.Element
1571 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
1572 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-613', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-614" class="py-name"><a title="lxml.etree
1573 lxml.sax.ElementTreeContentHandler.etree
1574 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1575 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1576 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-614', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-615" class="py-name"><a title="lxml.cssselect.Element
1579 lxml.objectify.Element
1580 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
1581 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-615', 'Element', 'link-69');">Element</a></tt> </tt>
1582 <a name="L451"></a><tt class="py-lineno"> 451</tt> <tt class="py-line"> <tt id="link-616" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-616', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-617" class="py-name"><a title="lxml.etree
1583 lxml.sax.ElementTreeContentHandler.etree
1584 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1585 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1586 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-617', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-618" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-618', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
1587 <a name="L452"></a><tt class="py-lineno"> 452</tt> <tt class="py-line"> <tt class="py-name">ProcessingInstruction</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-619" class="py-name"><a title="lxml.etree
1588 lxml.sax.ElementTreeContentHandler.etree
1589 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1590 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1591 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-619', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt class="py-name">ProcessingInstruction</tt> </tt>
1592 <a name="L453"></a><tt class="py-lineno"> 453</tt> <tt class="py-line"> </tt>
1593 <a name="L454"></a><tt class="py-lineno"> 454</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-620" class="py-name"><a title="lxml.cssselect.Element
1596 lxml.objectify.Element
1597 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
1598 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-620', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
1599 <a name="L455"></a><tt class="py-lineno"> 455</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-621" class="py-name" targets="Method lxml.etree._AppendOnlyElementProxy.append()=lxml.etree._AppendOnlyElementProxy-class.html#append,Method lxml.etree._Element.append()=lxml.etree._Element-class.html#append,Method lxml.etree._OpaqueDocumentWrapper.append()=lxml.etree._OpaqueDocumentWrapper-class.html#append,Method lxml.etree.__ContentOnlyElement.append()=lxml.etree.__ContentOnlyElement-class.html#append"><a title="lxml.etree._AppendOnlyElementProxy.append
1600 lxml.etree._Element.append
1601 lxml.etree._OpaqueDocumentWrapper.append
1602 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-621', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">ProcessingInstruction</tt><tt class="py-op">(</tt><tt class="py-string">'foo'</tt><tt class="py-op">,</tt> <tt class="py-string">'some more text'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1603 <a name="L456"></a><tt class="py-lineno"> 456</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-622" class="py-name" targets="Variable lxml.etree._BaseParser.target=lxml.etree._BaseParser-class.html#target,Variable lxml.etree._ModifyContentOnlyPIProxy.target=lxml.etree._ModifyContentOnlyPIProxy-class.html#target,Variable lxml.etree._ProcessingInstruction.target=lxml.etree._ProcessingInstruction-class.html#target,Variable lxml.etree._ReadOnlyPIProxy.target=lxml.etree._ReadOnlyPIProxy-class.html#target"><a title="lxml.etree._BaseParser.target
1604 lxml.etree._ModifyContentOnlyPIProxy.target
1605 lxml.etree._ProcessingInstruction.target
1606 lxml.etree._ReadOnlyPIProxy.target" class="py-name" href="#" onclick="return doclink('link-622', 'target', 'link-622');">target</a></tt><tt class="py-op">,</tt> <tt class="py-string">'foo'</tt><tt class="py-op">)</tt> </tt>
1607 <a name="L457"></a><tt class="py-lineno"> 457</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-623" class="py-name"><a title="lxml.etree.QName.text
1608 lxml.etree._AppendOnlyElementProxy.text
1609 lxml.etree._Element.text
1610 lxml.etree._Entity.text
1611 lxml.etree._ModifyContentOnlyProxy.text
1612 lxml.etree._ReadOnlyEntityProxy.text
1613 lxml.etree._ReadOnlyProxy.text
1614 lxml.etree.__ContentOnlyElement.text
1615 lxml.objectify.ObjectifiedElement.text
1616 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-623', 'text', 'link-194');">text</a></tt><tt class="py-op">,</tt> <tt class="py-string">'some more text'</tt><tt class="py-op">)</tt> </tt>
1617 </div><a name="L458"></a><tt class="py-lineno"> 458</tt> <tt class="py-line"> </tt>
1618 <a name="ETreeOnlyTestCase.test_pi_parse"></a><div id="ETreeOnlyTestCase.test_pi_parse-def"><a name="L459"></a><tt class="py-lineno"> 459</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_pi_parse-toggle" onclick="return toggle('ETreeOnlyTestCase.test_pi_parse');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_pi_parse">test_pi_parse</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
1619 </div><div id="ETreeOnlyTestCase.test_pi_parse-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_pi_parse-expanded"><a name="L460"></a><tt class="py-lineno"> 460</tt> <tt class="py-line"> <tt id="link-624" class="py-name"><a title="lxml.etree.XML
1621 lxml.tests.test_objectify.ObjectifyTestCase.XML
1622 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-624', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-625" class="py-name"><a title="lxml.etree
1623 lxml.sax.ElementTreeContentHandler.etree
1624 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1625 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1626 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-625', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-626" class="py-name"><a title="lxml.etree.XML
1628 lxml.tests.test_objectify.ObjectifyTestCase.XML
1629 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-626', 'XML', 'link-217');">XML</a></tt> </tt>
1630 <a name="L461"></a><tt class="py-lineno"> 461</tt> <tt class="py-line"> <tt id="link-627" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-627', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-628" class="py-name"><a title="lxml.etree.XML
1632 lxml.tests.test_objectify.ObjectifyTestCase.XML
1633 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-628', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-629" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-629', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">"<test><?mypi my test ?></test>"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1634 <a name="L462"></a><tt class="py-lineno"> 462</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-630" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-630', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-631" class="py-name"><a title="lxml.etree._BaseParser.target
1635 lxml.etree._ModifyContentOnlyPIProxy.target
1636 lxml.etree._ProcessingInstruction.target
1637 lxml.etree._ReadOnlyPIProxy.target" class="py-name" href="#" onclick="return doclink('link-631', 'target', 'link-622');">target</a></tt><tt class="py-op">,</tt> <tt class="py-string">"mypi"</tt><tt class="py-op">)</tt> </tt>
1638 <a name="L463"></a><tt class="py-lineno"> 463</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-632" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-632', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-633" class="py-name"><a title="lxml.etree.QName.text
1639 lxml.etree._AppendOnlyElementProxy.text
1640 lxml.etree._Element.text
1641 lxml.etree._Entity.text
1642 lxml.etree._ModifyContentOnlyProxy.text
1643 lxml.etree._ReadOnlyEntityProxy.text
1644 lxml.etree._ReadOnlyProxy.text
1645 lxml.etree.__ContentOnlyElement.text
1646 lxml.objectify.ObjectifiedElement.text
1647 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-633', 'text', 'link-194');">text</a></tt><tt class="py-op">,</tt> <tt class="py-string">"my test "</tt><tt class="py-op">)</tt> </tt>
1648 </div><a name="L464"></a><tt class="py-lineno"> 464</tt> <tt class="py-line"> </tt>
1649 <a name="ETreeOnlyTestCase.test_pi_pseudo_attributes_get"></a><div id="ETreeOnlyTestCase.test_pi_pseudo_attributes_get-def"><a name="L465"></a><tt class="py-lineno"> 465</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_pi_pseudo_attributes_get-toggle" onclick="return toggle('ETreeOnlyTestCase.test_pi_pseudo_attributes_get');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_pi_pseudo_attributes_get">test_pi_pseudo_attributes_get</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
1650 </div><div id="ETreeOnlyTestCase.test_pi_pseudo_attributes_get-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_pi_pseudo_attributes_get-expanded"><a name="L466"></a><tt class="py-lineno"> 466</tt> <tt class="py-line"> <tt id="link-634" class="py-name"><a title="lxml.etree.XML
1652 lxml.tests.test_objectify.ObjectifyTestCase.XML
1653 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-634', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-635" class="py-name"><a title="lxml.etree
1654 lxml.sax.ElementTreeContentHandler.etree
1655 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1656 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1657 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-635', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-636" class="py-name"><a title="lxml.etree.XML
1659 lxml.tests.test_objectify.ObjectifyTestCase.XML
1660 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-636', 'XML', 'link-217');">XML</a></tt> </tt>
1661 <a name="L467"></a><tt class="py-lineno"> 467</tt> <tt class="py-line"> <tt id="link-637" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-637', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-638" class="py-name"><a title="lxml.etree.XML
1663 lxml.tests.test_objectify.ObjectifyTestCase.XML
1664 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-638', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-639" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-639', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">"<test><?mypi my='1' test=\" abc \" quotes=\"' '\" only names ?></test>"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1665 <a name="L468"></a><tt class="py-lineno"> 468</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-640" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-640', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-641" class="py-name"><a title="lxml.etree._BaseParser.target
1666 lxml.etree._ModifyContentOnlyPIProxy.target
1667 lxml.etree._ProcessingInstruction.target
1668 lxml.etree._ReadOnlyPIProxy.target" class="py-name" href="#" onclick="return doclink('link-641', 'target', 'link-622');">target</a></tt><tt class="py-op">,</tt> <tt class="py-string">"mypi"</tt><tt class="py-op">)</tt> </tt>
1669 <a name="L469"></a><tt class="py-lineno"> 469</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-642" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-642', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-643" class="py-name"><a title="lxml.etree._Attrib.get
1670 lxml.etree._Element.get
1671 lxml.etree._IDDict.get
1672 lxml.etree._ProcessingInstruction.get
1673 lxml.etree._ReadOnlyElementProxy.get
1674 lxml.etree.__ContentOnlyElement.get" class="py-name" href="#" onclick="return doclink('link-643', 'get', 'link-243');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'my'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">"1"</tt><tt class="py-op">)</tt> </tt>
1675 <a name="L470"></a><tt class="py-lineno"> 470</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-644" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-644', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-645" class="py-name"><a title="lxml.etree._Attrib.get
1676 lxml.etree._Element.get
1677 lxml.etree._IDDict.get
1678 lxml.etree._ProcessingInstruction.get
1679 lxml.etree._ReadOnlyElementProxy.get
1680 lxml.etree.__ContentOnlyElement.get" class="py-name" href="#" onclick="return doclink('link-645', 'get', 'link-243');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'test'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">" abc "</tt><tt class="py-op">)</tt> </tt>
1681 <a name="L471"></a><tt class="py-lineno"> 471</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-646" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-646', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-647" class="py-name"><a title="lxml.etree._Attrib.get
1682 lxml.etree._Element.get
1683 lxml.etree._IDDict.get
1684 lxml.etree._ProcessingInstruction.get
1685 lxml.etree._ReadOnlyElementProxy.get
1686 lxml.etree.__ContentOnlyElement.get" class="py-name" href="#" onclick="return doclink('link-647', 'get', 'link-243');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'quotes'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">"' '"</tt><tt class="py-op">)</tt> </tt>
1687 <a name="L472"></a><tt class="py-lineno"> 472</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-648" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-648', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-649" class="py-name"><a title="lxml.etree._Attrib.get
1688 lxml.etree._Element.get
1689 lxml.etree._IDDict.get
1690 lxml.etree._ProcessingInstruction.get
1691 lxml.etree._ReadOnlyElementProxy.get
1692 lxml.etree.__ContentOnlyElement.get" class="py-name" href="#" onclick="return doclink('link-649', 'get', 'link-243');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'only'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
1693 <a name="L473"></a><tt class="py-lineno"> 473</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-650" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-650', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-651" class="py-name"><a title="lxml.etree._Attrib.get
1694 lxml.etree._Element.get
1695 lxml.etree._IDDict.get
1696 lxml.etree._ProcessingInstruction.get
1697 lxml.etree._ReadOnlyElementProxy.get
1698 lxml.etree.__ContentOnlyElement.get" class="py-name" href="#" onclick="return doclink('link-651', 'get', 'link-243');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'names'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
1699 <a name="L474"></a><tt class="py-lineno"> 474</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-652" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-652', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-653" class="py-name"><a title="lxml.etree._Attrib.get
1700 lxml.etree._Element.get
1701 lxml.etree._IDDict.get
1702 lxml.etree._ProcessingInstruction.get
1703 lxml.etree._ReadOnlyElementProxy.get
1704 lxml.etree.__ContentOnlyElement.get" class="py-name" href="#" onclick="return doclink('link-653', 'get', 'link-243');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'nope'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
1705 </div><a name="L475"></a><tt class="py-lineno"> 475</tt> <tt class="py-line"> </tt>
1706 <a name="ETreeOnlyTestCase.test_pi_pseudo_attributes_attrib"></a><div id="ETreeOnlyTestCase.test_pi_pseudo_attributes_attrib-def"><a name="L476"></a><tt class="py-lineno"> 476</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_pi_pseudo_attributes_attrib-toggle" onclick="return toggle('ETreeOnlyTestCase.test_pi_pseudo_attributes_attrib');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_pi_pseudo_attributes_attrib">test_pi_pseudo_attributes_attrib</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
1707 </div><div id="ETreeOnlyTestCase.test_pi_pseudo_attributes_attrib-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_pi_pseudo_attributes_attrib-expanded"><a name="L477"></a><tt class="py-lineno"> 477</tt> <tt class="py-line"> <tt id="link-654" class="py-name"><a title="lxml.etree.XML
1709 lxml.tests.test_objectify.ObjectifyTestCase.XML
1710 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-654', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-655" class="py-name"><a title="lxml.etree
1711 lxml.sax.ElementTreeContentHandler.etree
1712 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1713 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1714 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-655', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-656" class="py-name"><a title="lxml.etree.XML
1716 lxml.tests.test_objectify.ObjectifyTestCase.XML
1717 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-656', 'XML', 'link-217');">XML</a></tt> </tt>
1718 <a name="L478"></a><tt class="py-lineno"> 478</tt> <tt class="py-line"> <tt id="link-657" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-657', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-658" class="py-name"><a title="lxml.etree.XML
1720 lxml.tests.test_objectify.ObjectifyTestCase.XML
1721 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-658', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-659" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-659', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">"<test><?mypi my='1' test=\" abc \" quotes=\"' '\" only names ?></test>"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1722 <a name="L479"></a><tt class="py-lineno"> 479</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-660" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-660', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-661" class="py-name"><a title="lxml.etree._BaseParser.target
1723 lxml.etree._ModifyContentOnlyPIProxy.target
1724 lxml.etree._ProcessingInstruction.target
1725 lxml.etree._ReadOnlyPIProxy.target" class="py-name" href="#" onclick="return doclink('link-661', 'target', 'link-622');">target</a></tt><tt class="py-op">,</tt> <tt class="py-string">"mypi"</tt><tt class="py-op">)</tt> </tt>
1726 <a name="L480"></a><tt class="py-lineno"> 480</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-662" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-662', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-663" class="py-name"><a title="lxml.etree._Element.attrib
1727 lxml.etree._ProcessingInstruction.attrib
1728 lxml.etree._ReadOnlyElementProxy.attrib
1729 lxml.etree.__ContentOnlyElement.attrib
1730 xml.etree.ElementTree.Element.attrib" class="py-name" href="#" onclick="return doclink('link-663', 'attrib', 'link-224');">attrib</a></tt><tt class="py-op">[</tt><tt class="py-string">'my'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-string">"1"</tt><tt class="py-op">)</tt> </tt>
1731 <a name="L481"></a><tt class="py-lineno"> 481</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-664" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-664', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-665" class="py-name"><a title="lxml.etree._Element.attrib
1732 lxml.etree._ProcessingInstruction.attrib
1733 lxml.etree._ReadOnlyElementProxy.attrib
1734 lxml.etree.__ContentOnlyElement.attrib
1735 xml.etree.ElementTree.Element.attrib" class="py-name" href="#" onclick="return doclink('link-665', 'attrib', 'link-224');">attrib</a></tt><tt class="py-op">[</tt><tt class="py-string">'test'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-string">" abc "</tt><tt class="py-op">)</tt> </tt>
1736 <a name="L482"></a><tt class="py-lineno"> 482</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-666" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-666', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-667" class="py-name"><a title="lxml.etree._Element.attrib
1737 lxml.etree._ProcessingInstruction.attrib
1738 lxml.etree._ReadOnlyElementProxy.attrib
1739 lxml.etree.__ContentOnlyElement.attrib
1740 xml.etree.ElementTree.Element.attrib" class="py-name" href="#" onclick="return doclink('link-667', 'attrib', 'link-224');">attrib</a></tt><tt class="py-op">[</tt><tt class="py-string">'quotes'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-string">"' '"</tt><tt class="py-op">)</tt> </tt>
1741 <a name="L483"></a><tt class="py-lineno"> 483</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">KeyError</tt><tt class="py-op">,</tt> <tt id="link-668" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-668', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-669" class="py-name"><a title="lxml.etree._Element.attrib
1742 lxml.etree._ProcessingInstruction.attrib
1743 lxml.etree._ReadOnlyElementProxy.attrib
1744 lxml.etree.__ContentOnlyElement.attrib
1745 xml.etree.ElementTree.Element.attrib" class="py-name" href="#" onclick="return doclink('link-669', 'attrib', 'link-224');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-670" class="py-name" targets="Method lxml.etree._Attrib.__getitem__()=lxml.etree._Attrib-class.html#__getitem__,Method lxml.etree._Element.__getitem__()=lxml.etree._Element-class.html#__getitem__,Method lxml.etree._IDDict.__getitem__()=lxml.etree._IDDict-class.html#__getitem__,Method lxml.etree._ListErrorLog.__getitem__()=lxml.etree._ListErrorLog-class.html#__getitem__,Method lxml.etree._NamespaceRegistry.__getitem__()=lxml.etree._NamespaceRegistry-class.html#__getitem__,Method lxml.etree._ReadOnlyProxy.__getitem__()=lxml.etree._ReadOnlyProxy-class.html#__getitem__,Method lxml.etree.__ContentOnlyElement.__getitem__()=lxml.etree.__ContentOnlyElement-class.html#__getitem__,Method lxml.html.FieldsDict.__getitem__()=lxml.html.FieldsDict-class.html#__getitem__,Method lxml.html.InputGetter.__getitem__()=lxml.html.InputGetter-class.html#__getitem__,Method lxml.objectify.ObjectifiedElement.__getitem__()=lxml.objectify.ObjectifiedElement-class.html#__getitem__"><a title="lxml.etree._Attrib.__getitem__
1746 lxml.etree._Element.__getitem__
1747 lxml.etree._IDDict.__getitem__
1748 lxml.etree._ListErrorLog.__getitem__
1749 lxml.etree._NamespaceRegistry.__getitem__
1750 lxml.etree._ReadOnlyProxy.__getitem__
1751 lxml.etree.__ContentOnlyElement.__getitem__
1752 lxml.html.FieldsDict.__getitem__
1753 lxml.html.InputGetter.__getitem__
1754 lxml.objectify.ObjectifiedElement.__getitem__" class="py-name" href="#" onclick="return doclink('link-670', '__getitem__', 'link-670');">__getitem__</a></tt><tt class="py-op">,</tt> <tt class="py-string">'only'</tt><tt class="py-op">)</tt> </tt>
1755 <a name="L484"></a><tt class="py-lineno"> 484</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">KeyError</tt><tt class="py-op">,</tt> <tt id="link-671" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-671', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-672" class="py-name"><a title="lxml.etree._Element.attrib
1756 lxml.etree._ProcessingInstruction.attrib
1757 lxml.etree._ReadOnlyElementProxy.attrib
1758 lxml.etree.__ContentOnlyElement.attrib
1759 xml.etree.ElementTree.Element.attrib" class="py-name" href="#" onclick="return doclink('link-672', 'attrib', 'link-224');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-673" class="py-name"><a title="lxml.etree._Attrib.__getitem__
1760 lxml.etree._Element.__getitem__
1761 lxml.etree._IDDict.__getitem__
1762 lxml.etree._ListErrorLog.__getitem__
1763 lxml.etree._NamespaceRegistry.__getitem__
1764 lxml.etree._ReadOnlyProxy.__getitem__
1765 lxml.etree.__ContentOnlyElement.__getitem__
1766 lxml.html.FieldsDict.__getitem__
1767 lxml.html.InputGetter.__getitem__
1768 lxml.objectify.ObjectifiedElement.__getitem__" class="py-name" href="#" onclick="return doclink('link-673', '__getitem__', 'link-670');">__getitem__</a></tt><tt class="py-op">,</tt> <tt class="py-string">'names'</tt><tt class="py-op">)</tt> </tt>
1769 <a name="L485"></a><tt class="py-lineno"> 485</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">KeyError</tt><tt class="py-op">,</tt> <tt id="link-674" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-674', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-675" class="py-name"><a title="lxml.etree._Element.attrib
1770 lxml.etree._ProcessingInstruction.attrib
1771 lxml.etree._ReadOnlyElementProxy.attrib
1772 lxml.etree.__ContentOnlyElement.attrib
1773 xml.etree.ElementTree.Element.attrib" class="py-name" href="#" onclick="return doclink('link-675', 'attrib', 'link-224');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-676" class="py-name"><a title="lxml.etree._Attrib.__getitem__
1774 lxml.etree._Element.__getitem__
1775 lxml.etree._IDDict.__getitem__
1776 lxml.etree._ListErrorLog.__getitem__
1777 lxml.etree._NamespaceRegistry.__getitem__
1778 lxml.etree._ReadOnlyProxy.__getitem__
1779 lxml.etree.__ContentOnlyElement.__getitem__
1780 lxml.html.FieldsDict.__getitem__
1781 lxml.html.InputGetter.__getitem__
1782 lxml.objectify.ObjectifiedElement.__getitem__" class="py-name" href="#" onclick="return doclink('link-676', '__getitem__', 'link-670');">__getitem__</a></tt><tt class="py-op">,</tt> <tt class="py-string">'nope'</tt><tt class="py-op">)</tt> </tt>
1783 </div><a name="L486"></a><tt class="py-lineno"> 486</tt> <tt class="py-line"> </tt>
1784 <a name="ETreeOnlyTestCase.test_deepcopy_pi"></a><div id="ETreeOnlyTestCase.test_deepcopy_pi-def"><a name="L487"></a><tt class="py-lineno"> 487</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_deepcopy_pi-toggle" onclick="return toggle('ETreeOnlyTestCase.test_deepcopy_pi');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_deepcopy_pi">test_deepcopy_pi</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
1785 </div><div id="ETreeOnlyTestCase.test_deepcopy_pi-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_deepcopy_pi-expanded"><a name="L488"></a><tt class="py-lineno"> 488</tt> <tt class="py-line"> <tt class="py-comment"># previously caused a crash</tt> </tt>
1786 <a name="L489"></a><tt class="py-lineno"> 489</tt> <tt class="py-line"> <tt class="py-name">ProcessingInstruction</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-677" class="py-name"><a title="lxml.etree
1787 lxml.sax.ElementTreeContentHandler.etree
1788 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1789 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1790 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-677', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt class="py-name">ProcessingInstruction</tt> </tt>
1791 <a name="L490"></a><tt class="py-lineno"> 490</tt> <tt class="py-line"> </tt>
1792 <a name="L491"></a><tt class="py-lineno"> 491</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt class="py-name">ProcessingInstruction</tt><tt class="py-op">(</tt><tt class="py-string">"PI"</tt><tt class="py-op">,</tt> <tt class="py-string">"ONE"</tt><tt class="py-op">)</tt> </tt>
1793 <a name="L492"></a><tt class="py-lineno"> 492</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-678" class="py-name"><a title="lxml.etree.PyErrorLog.copy
1794 lxml.etree._BaseErrorLog.copy
1795 lxml.etree._BaseParser.copy
1796 lxml.etree._ErrorLog.copy
1797 lxml.etree._IDDict.copy
1798 lxml.etree._ListErrorLog.copy
1799 lxml.etree._ResolverRegistry.copy
1800 lxml.etree.iterparse.copy" class="py-name" href="#" onclick="return doclink('link-678', 'copy', 'link-1');">copy</a></tt><tt class="py-op">.</tt><tt class="py-name">deepcopy</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt> </tt>
1801 <a name="L493"></a><tt class="py-lineno"> 493</tt> <tt class="py-line"> <tt class="py-name">b</tt><tt class="py-op">.</tt><tt id="link-679" class="py-name"><a title="lxml.etree.QName.text
1802 lxml.etree._AppendOnlyElementProxy.text
1803 lxml.etree._Element.text
1804 lxml.etree._Entity.text
1805 lxml.etree._ModifyContentOnlyProxy.text
1806 lxml.etree._ReadOnlyEntityProxy.text
1807 lxml.etree._ReadOnlyProxy.text
1808 lxml.etree.__ContentOnlyElement.text
1809 lxml.objectify.ObjectifiedElement.text
1810 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-679', 'text', 'link-194');">text</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"ANOTHER"</tt> </tt>
1811 <a name="L494"></a><tt class="py-lineno"> 494</tt> <tt class="py-line"> </tt>
1812 <a name="L495"></a><tt class="py-lineno"> 495</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-string">'ONE'</tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-680" class="py-name"><a title="lxml.etree.QName.text
1813 lxml.etree._AppendOnlyElementProxy.text
1814 lxml.etree._Element.text
1815 lxml.etree._Entity.text
1816 lxml.etree._ModifyContentOnlyProxy.text
1817 lxml.etree._ReadOnlyEntityProxy.text
1818 lxml.etree._ReadOnlyProxy.text
1819 lxml.etree.__ContentOnlyElement.text
1820 lxml.objectify.ObjectifiedElement.text
1821 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-680', 'text', 'link-194');">text</a></tt><tt class="py-op">)</tt> </tt>
1822 <a name="L496"></a><tt class="py-lineno"> 496</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-string">'ANOTHER'</tt><tt class="py-op">,</tt> <tt class="py-name">b</tt><tt class="py-op">.</tt><tt id="link-681" class="py-name"><a title="lxml.etree.QName.text
1823 lxml.etree._AppendOnlyElementProxy.text
1824 lxml.etree._Element.text
1825 lxml.etree._Entity.text
1826 lxml.etree._ModifyContentOnlyProxy.text
1827 lxml.etree._ReadOnlyEntityProxy.text
1828 lxml.etree._ReadOnlyProxy.text
1829 lxml.etree.__ContentOnlyElement.text
1830 lxml.objectify.ObjectifiedElement.text
1831 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-681', 'text', 'link-194');">text</a></tt><tt class="py-op">)</tt> </tt>
1832 </div><a name="L497"></a><tt class="py-lineno"> 497</tt> <tt class="py-line"> </tt>
1833 <a name="ETreeOnlyTestCase.test_deepcopy_elementtree_pi"></a><div id="ETreeOnlyTestCase.test_deepcopy_elementtree_pi-def"><a name="L498"></a><tt class="py-lineno"> 498</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_deepcopy_elementtree_pi-toggle" onclick="return toggle('ETreeOnlyTestCase.test_deepcopy_elementtree_pi');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_deepcopy_elementtree_pi">test_deepcopy_elementtree_pi</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
1834 </div><div id="ETreeOnlyTestCase.test_deepcopy_elementtree_pi-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_deepcopy_elementtree_pi-expanded"><a name="L499"></a><tt class="py-lineno"> 499</tt> <tt class="py-line"> <tt id="link-682" class="py-name"><a title="lxml.etree.XML
1836 lxml.tests.test_objectify.ObjectifyTestCase.XML
1837 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-682', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-683" class="py-name"><a title="lxml.etree
1838 lxml.sax.ElementTreeContentHandler.etree
1839 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1840 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1841 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-683', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-684" class="py-name"><a title="lxml.etree.XML
1843 lxml.tests.test_objectify.ObjectifyTestCase.XML
1844 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-684', 'XML', 'link-217');">XML</a></tt> </tt>
1845 <a name="L500"></a><tt class="py-lineno"> 500</tt> <tt class="py-line"> <tt id="link-685" class="py-name"><a title="lxml.etree.XSLT.tostring
1847 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-685', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-686" class="py-name"><a title="lxml.etree
1848 lxml.sax.ElementTreeContentHandler.etree
1849 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1850 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1851 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-686', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-687" class="py-name"><a title="lxml.etree.XSLT.tostring
1853 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-687', 'tostring', 'link-597');">tostring</a></tt> </tt>
1854 <a name="L501"></a><tt class="py-lineno"> 501</tt> <tt class="py-line"> <tt id="link-688" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-688', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-689" class="py-name"><a title="lxml.etree.XML
1856 lxml.tests.test_objectify.ObjectifyTestCase.XML
1857 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-689', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-690" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-690', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">"<?mypi my test ?><test/><!--comment -->"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1858 <a name="L502"></a><tt class="py-lineno"> 502</tt> <tt class="py-line"> <tt class="py-name">tree1</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-691" class="py-name"><a title="lxml.etree
1859 lxml.sax.ElementTreeContentHandler.etree
1860 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1861 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1862 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-691', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-692" class="py-name"><a title="lxml.etree.ElementTree
1863 xml.etree.ElementTree
1864 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-692', 'ElementTree', 'link-468');">ElementTree</a></tt><tt class="py-op">(</tt><tt id="link-693" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-693', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt> </tt>
1865 <a name="L503"></a><tt class="py-lineno"> 503</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-694" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-694', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">"<?mypi my test ?><test/><!--comment -->"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1866 <a name="L504"></a><tt class="py-lineno"> 504</tt> <tt class="py-line"> <tt id="link-695" class="py-name"><a title="lxml.etree.XSLT.tostring
1868 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-695', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree1</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1869 <a name="L505"></a><tt class="py-lineno"> 505</tt> <tt class="py-line"> </tt>
1870 <a name="L506"></a><tt class="py-lineno"> 506</tt> <tt class="py-line"> <tt class="py-name">tree2</tt> <tt class="py-op">=</tt> <tt id="link-696" class="py-name"><a title="lxml.etree.PyErrorLog.copy
1871 lxml.etree._BaseErrorLog.copy
1872 lxml.etree._BaseParser.copy
1873 lxml.etree._ErrorLog.copy
1874 lxml.etree._IDDict.copy
1875 lxml.etree._ListErrorLog.copy
1876 lxml.etree._ResolverRegistry.copy
1877 lxml.etree.iterparse.copy" class="py-name" href="#" onclick="return doclink('link-696', 'copy', 'link-1');">copy</a></tt><tt class="py-op">.</tt><tt class="py-name">deepcopy</tt><tt class="py-op">(</tt><tt class="py-name">tree1</tt><tt class="py-op">)</tt> </tt>
1878 <a name="L507"></a><tt class="py-lineno"> 507</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-697" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-697', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">"<?mypi my test ?><test/><!--comment -->"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1879 <a name="L508"></a><tt class="py-lineno"> 508</tt> <tt class="py-line"> <tt id="link-698" class="py-name"><a title="lxml.etree.XSLT.tostring
1881 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-698', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree2</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1882 <a name="L509"></a><tt class="py-lineno"> 509</tt> <tt class="py-line"> </tt>
1883 <a name="L510"></a><tt class="py-lineno"> 510</tt> <tt class="py-line"> <tt class="py-name">root2</tt> <tt class="py-op">=</tt> <tt id="link-699" class="py-name"><a title="lxml.etree.PyErrorLog.copy
1884 lxml.etree._BaseErrorLog.copy
1885 lxml.etree._BaseParser.copy
1886 lxml.etree._ErrorLog.copy
1887 lxml.etree._IDDict.copy
1888 lxml.etree._ListErrorLog.copy
1889 lxml.etree._ResolverRegistry.copy
1890 lxml.etree.iterparse.copy" class="py-name" href="#" onclick="return doclink('link-699', 'copy', 'link-1');">copy</a></tt><tt class="py-op">.</tt><tt class="py-name">deepcopy</tt><tt class="py-op">(</tt><tt class="py-name">tree1</tt><tt class="py-op">.</tt><tt id="link-700" class="py-name" targets="Method lxml.etree._ElementTree.getroot()=lxml.etree._ElementTree-class.html#getroot"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-700', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1891 <a name="L511"></a><tt class="py-lineno"> 511</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-701" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-701', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">"<test/>"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1892 <a name="L512"></a><tt class="py-lineno"> 512</tt> <tt class="py-line"> <tt id="link-702" class="py-name"><a title="lxml.etree.XSLT.tostring
1894 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-702', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">root2</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1895 </div><a name="L513"></a><tt class="py-lineno"> 513</tt> <tt class="py-line"> </tt>
1896 <a name="ETreeOnlyTestCase.test_deepcopy_elementtree_dtd"></a><div id="ETreeOnlyTestCase.test_deepcopy_elementtree_dtd-def"><a name="L514"></a><tt class="py-lineno"> 514</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_deepcopy_elementtree_dtd-toggle" onclick="return toggle('ETreeOnlyTestCase.test_deepcopy_elementtree_dtd');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_deepcopy_elementtree_dtd">test_deepcopy_elementtree_dtd</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
1897 </div><div id="ETreeOnlyTestCase.test_deepcopy_elementtree_dtd-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_deepcopy_elementtree_dtd-expanded"><a name="L515"></a><tt class="py-lineno"> 515</tt> <tt class="py-line"> <tt id="link-703" class="py-name"><a title="lxml.etree.XML
1899 lxml.tests.test_objectify.ObjectifyTestCase.XML
1900 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-703', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-704" class="py-name"><a title="lxml.etree
1901 lxml.sax.ElementTreeContentHandler.etree
1902 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1903 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1904 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-704', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-705" class="py-name"><a title="lxml.etree.XML
1906 lxml.tests.test_objectify.ObjectifyTestCase.XML
1907 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-705', 'XML', 'link-217');">XML</a></tt> </tt>
1908 <a name="L516"></a><tt class="py-lineno"> 516</tt> <tt class="py-line"> <tt id="link-706" class="py-name"><a title="lxml.etree.XSLT.tostring
1910 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-706', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-707" class="py-name"><a title="lxml.etree
1911 lxml.sax.ElementTreeContentHandler.etree
1912 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1913 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1914 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-707', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-708" class="py-name"><a title="lxml.etree.XSLT.tostring
1916 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-708', 'tostring', 'link-597');">tostring</a></tt> </tt>
1917 <a name="L517"></a><tt class="py-lineno"> 517</tt> <tt class="py-line"> <tt id="link-709" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-709', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-710" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-710', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!DOCTYPE test [\n<!ENTITY entity "tasty">\n]>\n<test/>'</tt><tt class="py-op">)</tt> </tt>
1918 <a name="L518"></a><tt class="py-lineno"> 518</tt> <tt class="py-line"> <tt id="link-711" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-711', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-712" class="py-name"><a title="lxml.etree.XML
1920 lxml.tests.test_objectify.ObjectifyTestCase.XML
1921 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-712', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-713" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-713', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
1922 <a name="L519"></a><tt class="py-lineno"> 519</tt> <tt class="py-line"> <tt class="py-name">tree1</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-714" class="py-name"><a title="lxml.etree
1923 lxml.sax.ElementTreeContentHandler.etree
1924 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1925 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1926 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-714', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-715" class="py-name"><a title="lxml.etree.ElementTree
1927 xml.etree.ElementTree
1928 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-715', 'ElementTree', 'link-468');">ElementTree</a></tt><tt class="py-op">(</tt><tt id="link-716" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-716', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt> </tt>
1929 <a name="L520"></a><tt class="py-lineno"> 520</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-717" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-717', 'xml', 'link-256');">xml</a></tt><tt class="py-op">,</tt> <tt id="link-718" class="py-name"><a title="lxml.etree.XSLT.tostring
1931 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-718', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree1</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1932 <a name="L521"></a><tt class="py-lineno"> 521</tt> <tt class="py-line"> </tt>
1933 <a name="L522"></a><tt class="py-lineno"> 522</tt> <tt class="py-line"> <tt class="py-name">tree2</tt> <tt class="py-op">=</tt> <tt id="link-719" class="py-name"><a title="lxml.etree.PyErrorLog.copy
1934 lxml.etree._BaseErrorLog.copy
1935 lxml.etree._BaseParser.copy
1936 lxml.etree._ErrorLog.copy
1937 lxml.etree._IDDict.copy
1938 lxml.etree._ListErrorLog.copy
1939 lxml.etree._ResolverRegistry.copy
1940 lxml.etree.iterparse.copy" class="py-name" href="#" onclick="return doclink('link-719', 'copy', 'link-1');">copy</a></tt><tt class="py-op">.</tt><tt class="py-name">deepcopy</tt><tt class="py-op">(</tt><tt class="py-name">tree1</tt><tt class="py-op">)</tt> </tt>
1941 <a name="L523"></a><tt class="py-lineno"> 523</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-720" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-720', 'xml', 'link-256');">xml</a></tt><tt class="py-op">,</tt> <tt id="link-721" class="py-name"><a title="lxml.etree.XSLT.tostring
1943 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-721', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree2</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1944 <a name="L524"></a><tt class="py-lineno"> 524</tt> <tt class="py-line"> </tt>
1945 <a name="L525"></a><tt class="py-lineno"> 525</tt> <tt class="py-line"> <tt class="py-name">root2</tt> <tt class="py-op">=</tt> <tt id="link-722" class="py-name"><a title="lxml.etree.PyErrorLog.copy
1946 lxml.etree._BaseErrorLog.copy
1947 lxml.etree._BaseParser.copy
1948 lxml.etree._ErrorLog.copy
1949 lxml.etree._IDDict.copy
1950 lxml.etree._ListErrorLog.copy
1951 lxml.etree._ResolverRegistry.copy
1952 lxml.etree.iterparse.copy" class="py-name" href="#" onclick="return doclink('link-722', 'copy', 'link-1');">copy</a></tt><tt class="py-op">.</tt><tt class="py-name">deepcopy</tt><tt class="py-op">(</tt><tt class="py-name">tree1</tt><tt class="py-op">.</tt><tt id="link-723" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-723', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1953 <a name="L526"></a><tt class="py-lineno"> 526</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-724" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-724', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">"<test/>"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
1954 <a name="L527"></a><tt class="py-lineno"> 527</tt> <tt class="py-line"> <tt id="link-725" class="py-name"><a title="lxml.etree.XSLT.tostring
1956 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-725', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">root2</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1957 </div><a name="L528"></a><tt class="py-lineno"> 528</tt> <tt class="py-line"> </tt>
1958 <a name="ETreeOnlyTestCase.test_attribute_set"></a><div id="ETreeOnlyTestCase.test_attribute_set-def"><a name="L529"></a><tt class="py-lineno"> 529</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_attribute_set-toggle" onclick="return toggle('ETreeOnlyTestCase.test_attribute_set');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_attribute_set">test_attribute_set</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
1959 </div><div id="ETreeOnlyTestCase.test_attribute_set-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_attribute_set-expanded"><a name="L530"></a><tt class="py-lineno"> 530</tt> <tt class="py-line"> <tt class="py-comment"># ElementTree accepts arbitrary attribute values</tt> </tt>
1960 <a name="L531"></a><tt class="py-lineno"> 531</tt> <tt class="py-line"> <tt class="py-comment"># lxml.etree allows only strings</tt> </tt>
1961 <a name="L532"></a><tt class="py-lineno"> 532</tt> <tt class="py-line"> <tt id="link-726" class="py-name"><a title="lxml.cssselect.Element
1964 lxml.objectify.Element
1965 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
1966 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-726', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-727" class="py-name"><a title="lxml.etree
1967 lxml.sax.ElementTreeContentHandler.etree
1968 lxml.tests.test_elementtree.CElementTreeTestCase.etree
1969 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
1970 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-727', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-728" class="py-name"><a title="lxml.cssselect.Element
1973 lxml.objectify.Element
1974 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
1975 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-728', 'Element', 'link-69');">Element</a></tt> </tt>
1976 <a name="L533"></a><tt class="py-lineno"> 533</tt> <tt class="py-line"> </tt>
1977 <a name="L534"></a><tt class="py-lineno"> 534</tt> <tt class="py-line"> <tt id="link-729" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-729', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-730" class="py-name"><a title="lxml.cssselect.Element
1980 lxml.objectify.Element
1981 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
1982 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-730', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">"root"</tt><tt class="py-op">)</tt> </tt>
1983 <a name="L535"></a><tt class="py-lineno"> 535</tt> <tt class="py-line"> <tt id="link-731" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-731', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-732" class="py-name"><a title="lxml.etree._Element.set
1984 lxml.etree._XSLTProcessingInstruction.set
1985 lxml.etree.__ContentOnlyElement.set" class="py-name" href="#" onclick="return doclink('link-732', 'set', 'link-241');">set</a></tt><tt class="py-op">(</tt><tt class="py-string">"attr"</tt><tt class="py-op">,</tt> <tt class="py-string">"TEST"</tt><tt class="py-op">)</tt> </tt>
1986 <a name="L536"></a><tt class="py-lineno"> 536</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-string">"TEST"</tt><tt class="py-op">,</tt> <tt id="link-733" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-733', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-734" class="py-name"><a title="lxml.etree._Attrib.get
1987 lxml.etree._Element.get
1988 lxml.etree._IDDict.get
1989 lxml.etree._ProcessingInstruction.get
1990 lxml.etree._ReadOnlyElementProxy.get
1991 lxml.etree.__ContentOnlyElement.get" class="py-name" href="#" onclick="return doclink('link-734', 'get', 'link-243');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">"attr"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
1992 <a name="L537"></a><tt class="py-lineno"> 537</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">TypeError</tt><tt class="py-op">,</tt> <tt id="link-735" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-735', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-736" class="py-name"><a title="lxml.etree._Element.set
1993 lxml.etree._XSLTProcessingInstruction.set
1994 lxml.etree.__ContentOnlyElement.set" class="py-name" href="#" onclick="return doclink('link-736', 'set', 'link-241');">set</a></tt><tt class="py-op">,</tt> <tt class="py-string">"newattr"</tt><tt class="py-op">,</tt> <tt class="py-number">5</tt><tt class="py-op">)</tt> </tt>
1995 </div><a name="L538"></a><tt class="py-lineno"> 538</tt> <tt class="py-line"> </tt>
1996 <a name="ETreeOnlyTestCase.test_parse_remove_comments"></a><div id="ETreeOnlyTestCase.test_parse_remove_comments-def"><a name="L539"></a><tt class="py-lineno"> 539</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_parse_remove_comments-toggle" onclick="return toggle('ETreeOnlyTestCase.test_parse_remove_comments');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parse_remove_comments">test_parse_remove_comments</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
1997 </div><div id="ETreeOnlyTestCase.test_parse_remove_comments-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_parse_remove_comments-expanded"><a name="L540"></a><tt class="py-lineno"> 540</tt> <tt class="py-line"> <tt id="link-737" class="py-name" targets="Function lxml.etree.fromstring()=lxml.etree-module.html#fromstring,Function lxml.html.fromstring()=lxml.html-module.html#fromstring,Function lxml.html.html5parser.fromstring()=lxml.html.html5parser-module.html#fromstring,Function lxml.html.soupparser.fromstring()=lxml.html.soupparser-module.html#fromstring,Function lxml.objectify.fromstring()=lxml.objectify-module.html#fromstring"><a title="lxml.etree.fromstring
1998 lxml.html.fromstring
1999 lxml.html.html5parser.fromstring
2000 lxml.html.soupparser.fromstring
2001 lxml.objectify.fromstring" class="py-name" href="#" onclick="return doclink('link-737', 'fromstring', 'link-737');">fromstring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-738" class="py-name"><a title="lxml.etree
2002 lxml.sax.ElementTreeContentHandler.etree
2003 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2004 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2005 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-738', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-739" class="py-name"><a title="lxml.etree.fromstring
2006 lxml.html.fromstring
2007 lxml.html.html5parser.fromstring
2008 lxml.html.soupparser.fromstring
2009 lxml.objectify.fromstring" class="py-name" href="#" onclick="return doclink('link-739', 'fromstring', 'link-737');">fromstring</a></tt> </tt>
2010 <a name="L541"></a><tt class="py-lineno"> 541</tt> <tt class="py-line"> <tt id="link-740" class="py-name"><a title="lxml.etree.XSLT.tostring
2012 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-740', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-741" class="py-name"><a title="lxml.etree
2013 lxml.sax.ElementTreeContentHandler.etree
2014 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2015 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2016 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-741', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-742" class="py-name"><a title="lxml.etree.XSLT.tostring
2018 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-742', 'tostring', 'link-597');">tostring</a></tt> </tt>
2019 <a name="L542"></a><tt class="py-lineno"> 542</tt> <tt class="py-line"> <tt id="link-743" class="py-name" targets="Class lxml.etree.XMLParser=lxml.etree.XMLParser-class.html,Class xml.etree.ElementTree.XMLParser=xml.etree.ElementTree.XMLParser-class.html"><a title="lxml.etree.XMLParser
2020 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-743', 'XMLParser', 'link-743');">XMLParser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-744" class="py-name"><a title="lxml.etree
2021 lxml.sax.ElementTreeContentHandler.etree
2022 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2023 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2024 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-744', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-745" class="py-name"><a title="lxml.etree.XMLParser
2025 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-745', 'XMLParser', 'link-743');">XMLParser</a></tt> </tt>
2026 <a name="L543"></a><tt class="py-lineno"> 543</tt> <tt class="py-line"> </tt>
2027 <a name="L544"></a><tt class="py-lineno"> 544</tt> <tt class="py-line"> <tt id="link-746" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-746', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-747" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-747', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><!--A--><b><!-- B --><c/></b><!--C--></a>'</tt><tt class="py-op">)</tt> </tt>
2028 <a name="L545"></a><tt class="py-lineno"> 545</tt> <tt class="py-line"> <tt id="link-748" class="py-name" targets="Variable lxml.etree._ElementTree.parser=lxml.etree._ElementTree-class.html#parser,Variable lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser=lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#parser"><a title="lxml.etree._ElementTree.parser
2029 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-748', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt id="link-749" class="py-name"><a title="lxml.etree.XMLParser
2030 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-749', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt class="py-name">remove_comments</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
2031 <a name="L546"></a><tt class="py-lineno"> 546</tt> <tt class="py-line"> <tt id="link-750" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-750', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-751" class="py-name"><a title="lxml.etree.fromstring
2032 lxml.html.fromstring
2033 lxml.html.html5parser.fromstring
2034 lxml.html.soupparser.fromstring
2035 lxml.objectify.fromstring" class="py-name" href="#" onclick="return doclink('link-751', 'fromstring', 'link-737');">fromstring</a></tt><tt class="py-op">(</tt><tt id="link-752" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-752', 'xml', 'link-256');">xml</a></tt><tt class="py-op">,</tt> <tt id="link-753" class="py-name"><a title="lxml.etree._ElementTree.parser
2036 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-753', 'parser', 'link-748');">parser</a></tt><tt class="py-op">)</tt> </tt>
2037 <a name="L547"></a><tt class="py-lineno"> 547</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
2038 <a name="L548"></a><tt class="py-lineno"> 548</tt> <tt class="py-line"> <tt id="link-754" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-754', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b><c/></b></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
2039 <a name="L549"></a><tt class="py-lineno"> 549</tt> <tt class="py-line"> <tt id="link-755" class="py-name"><a title="lxml.etree.XSLT.tostring
2041 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-755', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt id="link-756" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-756', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2042 </div><a name="L550"></a><tt class="py-lineno"> 550</tt> <tt class="py-line"> </tt>
2043 <a name="ETreeOnlyTestCase.test_parse_remove_pis"></a><div id="ETreeOnlyTestCase.test_parse_remove_pis-def"><a name="L551"></a><tt class="py-lineno"> 551</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_parse_remove_pis-toggle" onclick="return toggle('ETreeOnlyTestCase.test_parse_remove_pis');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parse_remove_pis">test_parse_remove_pis</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2044 </div><div id="ETreeOnlyTestCase.test_parse_remove_pis-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_parse_remove_pis-expanded"><a name="L552"></a><tt class="py-lineno"> 552</tt> <tt class="py-line"> <tt id="link-757" class="py-name" targets="Function lxml.cssselect.parse()=lxml.cssselect-module.html#parse,Method lxml.etree._ElementTree.parse()=lxml.etree._ElementTree-class.html#parse,Function lxml.etree.parse()=lxml.etree-module.html#parse,Function lxml.html.ElementSoup.parse()=lxml.html.ElementSoup-module.html#parse,Function lxml.html.html5parser.parse()=lxml.html.html5parser-module.html#parse,Function lxml.html.parse()=lxml.html-module.html#parse,Function lxml.html.soupparser.parse()=lxml.html.soupparser-module.html#parse,Function lxml.objectify.parse()=lxml.objectify-module.html#parse,Method lxml.tests.common_imports.HelperTestCase.parse()=lxml.tests.common_imports.HelperTestCase-class.html#parse"><a title="lxml.cssselect.parse
2045 lxml.etree._ElementTree.parse
2047 lxml.html.ElementSoup.parse
2048 lxml.html.html5parser.parse
2050 lxml.html.soupparser.parse
2051 lxml.objectify.parse
2052 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-757', 'parse', 'link-757');">parse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-758" class="py-name"><a title="lxml.etree
2053 lxml.sax.ElementTreeContentHandler.etree
2054 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2055 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2056 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-758', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-759" class="py-name"><a title="lxml.cssselect.parse
2057 lxml.etree._ElementTree.parse
2059 lxml.html.ElementSoup.parse
2060 lxml.html.html5parser.parse
2062 lxml.html.soupparser.parse
2063 lxml.objectify.parse
2064 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-759', 'parse', 'link-757');">parse</a></tt> </tt>
2065 <a name="L553"></a><tt class="py-lineno"> 553</tt> <tt class="py-line"> <tt id="link-760" class="py-name"><a title="lxml.etree.XSLT.tostring
2067 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-760', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-761" class="py-name"><a title="lxml.etree
2068 lxml.sax.ElementTreeContentHandler.etree
2069 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2070 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2071 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-761', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-762" class="py-name"><a title="lxml.etree.XSLT.tostring
2073 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-762', 'tostring', 'link-597');">tostring</a></tt> </tt>
2074 <a name="L554"></a><tt class="py-lineno"> 554</tt> <tt class="py-line"> <tt id="link-763" class="py-name"><a title="lxml.etree.XMLParser
2075 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-763', 'XMLParser', 'link-743');">XMLParser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-764" class="py-name"><a title="lxml.etree
2076 lxml.sax.ElementTreeContentHandler.etree
2077 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2078 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2079 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-764', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-765" class="py-name"><a title="lxml.etree.XMLParser
2080 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-765', 'XMLParser', 'link-743');">XMLParser</a></tt> </tt>
2081 <a name="L555"></a><tt class="py-lineno"> 555</tt> <tt class="py-line"> </tt>
2082 <a name="L556"></a><tt class="py-lineno"> 556</tt> <tt class="py-line"> <tt id="link-766" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-766', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-767" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-767', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<?test?><a><?A?><b><?B?><c/></b><?C?></a><?tail?>'</tt><tt class="py-op">)</tt> </tt>
2083 <a name="L557"></a><tt class="py-lineno"> 557</tt> <tt class="py-line"> </tt>
2084 <a name="L558"></a><tt class="py-lineno"> 558</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt id="link-768" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-768', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
2085 <a name="L559"></a><tt class="py-lineno"> 559</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-769" class="py-name"><a title="lxml.cssselect.parse
2086 lxml.etree._ElementTree.parse
2088 lxml.html.ElementSoup.parse
2089 lxml.html.html5parser.parse
2091 lxml.html.soupparser.parse
2092 lxml.objectify.parse
2093 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-769', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
2094 <a name="L560"></a><tt class="py-lineno"> 560</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
2095 <a name="L561"></a><tt class="py-lineno"> 561</tt> <tt class="py-line"> <tt id="link-770" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-770', 'xml', 'link-256');">xml</a></tt><tt class="py-op">,</tt> </tt>
2096 <a name="L562"></a><tt class="py-lineno"> 562</tt> <tt class="py-line"> <tt id="link-771" class="py-name"><a title="lxml.etree.XSLT.tostring
2098 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-771', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2099 <a name="L563"></a><tt class="py-lineno"> 563</tt> <tt class="py-line"> </tt>
2100 <a name="L564"></a><tt class="py-lineno"> 564</tt> <tt class="py-line"> <tt id="link-772" class="py-name"><a title="lxml.etree._ElementTree.parser
2101 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-772', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt id="link-773" class="py-name"><a title="lxml.etree.XMLParser
2102 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-773', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt class="py-name">remove_pis</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
2103 <a name="L565"></a><tt class="py-lineno"> 565</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-774" class="py-name"><a title="lxml.cssselect.parse
2104 lxml.etree._ElementTree.parse
2106 lxml.html.ElementSoup.parse
2107 lxml.html.html5parser.parse
2109 lxml.html.soupparser.parse
2110 lxml.objectify.parse
2111 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-774', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt id="link-775" class="py-name"><a title="lxml.etree._ElementTree.parser
2112 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-775', 'parser', 'link-748');">parser</a></tt><tt class="py-op">)</tt> </tt>
2113 <a name="L566"></a><tt class="py-lineno"> 566</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
2114 <a name="L567"></a><tt class="py-lineno"> 567</tt> <tt class="py-line"> <tt id="link-776" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-776', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b><c/></b></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
2115 <a name="L568"></a><tt class="py-lineno"> 568</tt> <tt class="py-line"> <tt id="link-777" class="py-name"><a title="lxml.etree.XSLT.tostring
2117 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-777', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2118 </div><a name="L569"></a><tt class="py-lineno"> 569</tt> <tt class="py-line"> </tt>
2119 <a name="ETreeOnlyTestCase.test_parse_parser_type_error"></a><div id="ETreeOnlyTestCase.test_parse_parser_type_error-def"><a name="L570"></a><tt class="py-lineno"> 570</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_parse_parser_type_error-toggle" onclick="return toggle('ETreeOnlyTestCase.test_parse_parser_type_error');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parse_parser_type_error">test_parse_parser_type_error</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2120 </div><div id="ETreeOnlyTestCase.test_parse_parser_type_error-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_parse_parser_type_error-expanded"><a name="L571"></a><tt class="py-lineno"> 571</tt> <tt class="py-line"> <tt class="py-comment"># ET raises IOError only</tt> </tt>
2121 <a name="L572"></a><tt class="py-lineno"> 572</tt> <tt class="py-line"> <tt id="link-778" class="py-name"><a title="lxml.cssselect.parse
2122 lxml.etree._ElementTree.parse
2124 lxml.html.ElementSoup.parse
2125 lxml.html.html5parser.parse
2127 lxml.html.soupparser.parse
2128 lxml.objectify.parse
2129 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-778', 'parse', 'link-757');">parse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-779" class="py-name"><a title="lxml.etree
2130 lxml.sax.ElementTreeContentHandler.etree
2131 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2132 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2133 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-779', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-780" class="py-name"><a title="lxml.cssselect.parse
2134 lxml.etree._ElementTree.parse
2136 lxml.html.ElementSoup.parse
2137 lxml.html.html5parser.parse
2139 lxml.html.soupparser.parse
2140 lxml.objectify.parse
2141 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-780', 'parse', 'link-757');">parse</a></tt> </tt>
2142 <a name="L573"></a><tt class="py-lineno"> 573</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">TypeError</tt><tt class="py-op">,</tt> <tt id="link-781" class="py-name"><a title="lxml.cssselect.parse
2143 lxml.etree._ElementTree.parse
2145 lxml.html.ElementSoup.parse
2146 lxml.html.html5parser.parse
2148 lxml.html.soupparser.parse
2149 lxml.objectify.parse
2150 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-781', 'parse', 'link-757');">parse</a></tt><tt class="py-op">,</tt> <tt class="py-string">'notthere.xml'</tt><tt class="py-op">,</tt> <tt class="py-name">object</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2151 </div><a name="L574"></a><tt class="py-lineno"> 574</tt> <tt class="py-line"> </tt>
2152 <a name="ETreeOnlyTestCase.test_iterparse_tree_comments"></a><div id="ETreeOnlyTestCase.test_iterparse_tree_comments-def"><a name="L575"></a><tt class="py-lineno"> 575</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterparse_tree_comments-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterparse_tree_comments');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_tree_comments">test_iterparse_tree_comments</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2153 </div><div id="ETreeOnlyTestCase.test_iterparse_tree_comments-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterparse_tree_comments-expanded"><a name="L576"></a><tt class="py-lineno"> 576</tt> <tt class="py-line"> <tt class="py-comment"># ET removes comments</tt> </tt>
2154 <a name="L577"></a><tt class="py-lineno"> 577</tt> <tt class="py-line"> <tt id="link-782" class="py-name" targets="Class lxml.etree.iterparse=lxml.etree.iterparse-class.html"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-782', 'iterparse', 'link-782');">iterparse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-783" class="py-name"><a title="lxml.etree
2155 lxml.sax.ElementTreeContentHandler.etree
2156 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2157 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2158 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-783', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-784" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-784', 'iterparse', 'link-782');">iterparse</a></tt> </tt>
2159 <a name="L578"></a><tt class="py-lineno"> 578</tt> <tt class="py-line"> <tt id="link-785" class="py-name"><a title="lxml.etree.XSLT.tostring
2161 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-785', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-786" class="py-name"><a title="lxml.etree
2162 lxml.sax.ElementTreeContentHandler.etree
2163 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2164 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2165 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-786', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-787" class="py-name"><a title="lxml.etree.XSLT.tostring
2167 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-787', 'tostring', 'link-597');">tostring</a></tt> </tt>
2168 <a name="L579"></a><tt class="py-lineno"> 579</tt> <tt class="py-line"> </tt>
2169 <a name="L580"></a><tt class="py-lineno"> 580</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-string">'<a><!--A--><b><!-- B --><c/></b><!--C--></a>'</tt><tt class="py-op">)</tt> </tt>
2170 <a name="L581"></a><tt class="py-lineno"> 581</tt> <tt class="py-line"> <tt class="py-name">events</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt id="link-788" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-788', 'iterparse', 'link-782');">iterparse</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2171 <a name="L582"></a><tt class="py-lineno"> 582</tt> <tt class="py-line"> <tt id="link-789" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-789', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">events</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
2172 <a name="L583"></a><tt class="py-lineno"> 583</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-number">3</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">events</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2173 <a name="L584"></a><tt class="py-lineno"> 584</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
2174 <a name="L585"></a><tt class="py-lineno"> 585</tt> <tt class="py-line"> <tt id="link-790" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-790', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><!--A--><b><!-- B --><c/></b><!--C--></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
2175 <a name="L586"></a><tt class="py-lineno"> 586</tt> <tt class="py-line"> <tt id="link-791" class="py-name"><a title="lxml.etree.XSLT.tostring
2177 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-791', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt id="link-792" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-792', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2178 </div><a name="L587"></a><tt class="py-lineno"> 587</tt> <tt class="py-line"> </tt>
2179 <a name="ETreeOnlyTestCase.test_iterparse_comments"></a><div id="ETreeOnlyTestCase.test_iterparse_comments-def"><a name="L588"></a><tt class="py-lineno"> 588</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterparse_comments-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterparse_comments');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_comments">test_iterparse_comments</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2180 </div><div id="ETreeOnlyTestCase.test_iterparse_comments-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterparse_comments-expanded"><a name="L589"></a><tt class="py-lineno"> 589</tt> <tt class="py-line"> <tt class="py-comment"># ET removes comments</tt> </tt>
2181 <a name="L590"></a><tt class="py-lineno"> 590</tt> <tt class="py-line"> <tt id="link-793" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-793', 'iterparse', 'link-782');">iterparse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-794" class="py-name"><a title="lxml.etree
2182 lxml.sax.ElementTreeContentHandler.etree
2183 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2184 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2185 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-794', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-795" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-795', 'iterparse', 'link-782');">iterparse</a></tt> </tt>
2186 <a name="L591"></a><tt class="py-lineno"> 591</tt> <tt class="py-line"> <tt id="link-796" class="py-name"><a title="lxml.etree.XSLT.tostring
2188 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-796', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-797" class="py-name"><a title="lxml.etree
2189 lxml.sax.ElementTreeContentHandler.etree
2190 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2191 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2192 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-797', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-798" class="py-name"><a title="lxml.etree.XSLT.tostring
2194 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-798', 'tostring', 'link-597');">tostring</a></tt> </tt>
2195 <a name="L592"></a><tt class="py-lineno"> 592</tt> <tt class="py-line"> </tt>
2196 <a name="L593"></a><tt class="py-lineno"> 593</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">name</tt><tt class="py-op">(</tt><tt class="py-param">event</tt><tt class="py-op">,</tt> <tt class="py-param">el</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2197 <a name="L594"></a><tt class="py-lineno"> 594</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">event</tt> <tt class="py-op">==</tt> <tt class="py-string">'comment'</tt><tt class="py-op">:</tt> </tt>
2198 <a name="L595"></a><tt class="py-lineno"> 595</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-799" class="py-name"><a title="lxml.etree.QName.text
2199 lxml.etree._AppendOnlyElementProxy.text
2200 lxml.etree._Element.text
2201 lxml.etree._Entity.text
2202 lxml.etree._ModifyContentOnlyProxy.text
2203 lxml.etree._ReadOnlyEntityProxy.text
2204 lxml.etree._ReadOnlyProxy.text
2205 lxml.etree.__ContentOnlyElement.text
2206 lxml.objectify.ObjectifiedElement.text
2207 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-799', 'text', 'link-194');">text</a></tt> </tt>
2208 <a name="L596"></a><tt class="py-lineno"> 596</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
2209 <a name="L597"></a><tt class="py-lineno"> 597</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-800" class="py-name"><a title="lxml.etree._Comment.tag
2210 lxml.etree._Element.tag
2211 lxml.etree._Entity.tag
2212 lxml.etree._ProcessingInstruction.tag
2213 lxml.etree._ReadOnlyProxy.tag
2214 lxml.tests.test_xpathevaluator.tag
2215 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-800', 'tag', 'link-73');">tag</a></tt> </tt>
2216 </div><a name="L598"></a><tt class="py-lineno"> 598</tt> <tt class="py-line"> </tt>
2217 <a name="L599"></a><tt class="py-lineno"> 599</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-string">'<a><!--A--><b><!-- B --><c/></b><!--C--></a>'</tt><tt class="py-op">)</tt> </tt>
2218 <a name="L600"></a><tt class="py-lineno"> 600</tt> <tt class="py-line"> <tt class="py-name">events</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt id="link-801" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-801', 'iterparse', 'link-782');">iterparse</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">events</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-string">'end'</tt><tt class="py-op">,</tt> <tt class="py-string">'comment'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2219 <a name="L601"></a><tt class="py-lineno"> 601</tt> <tt class="py-line"> <tt id="link-802" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-802', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">events</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
2220 <a name="L602"></a><tt class="py-lineno"> 602</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-number">6</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">events</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2221 <a name="L603"></a><tt class="py-lineno"> 603</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'A'</tt><tt class="py-op">,</tt> <tt class="py-string">' B '</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">,</tt> <tt class="py-string">'C'</tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
2222 <a name="L604"></a><tt class="py-lineno"> 604</tt> <tt class="py-line"> <tt class="py-op">[</tt> <tt id="link-803" class="py-name" targets="Variable lxml.etree._Entity.name=lxml.etree._Entity-class.html#name,Variable lxml.etree._ModifyContentOnlyEntityProxy.name=lxml.etree._ModifyContentOnlyEntityProxy-class.html#name,Variable lxml.etree._ReadOnlyEntityProxy.name=lxml.etree._ReadOnlyEntityProxy-class.html#name,Variable lxml.html.InputMixin.name=lxml.html.InputMixin-class.html#name,Variable lxml.objectify.PyType.name=lxml.objectify.PyType-class.html#name"><a title="lxml.etree._Entity.name
2223 lxml.etree._ModifyContentOnlyEntityProxy.name
2224 lxml.etree._ReadOnlyEntityProxy.name
2225 lxml.html.InputMixin.name
2226 lxml.objectify.PyType.name" class="py-name" href="#" onclick="return doclink('link-803', 'name', 'link-803');">name</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">events</tt> <tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
2227 <a name="L605"></a><tt class="py-lineno"> 605</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
2228 <a name="L606"></a><tt class="py-lineno"> 606</tt> <tt class="py-line"> <tt id="link-804" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-804', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><!--A--><b><!-- B --><c/></b><!--C--></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
2229 <a name="L607"></a><tt class="py-lineno"> 607</tt> <tt class="py-line"> <tt id="link-805" class="py-name"><a title="lxml.etree.XSLT.tostring
2231 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-805', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt id="link-806" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-806', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2232 </div><a name="L608"></a><tt class="py-lineno"> 608</tt> <tt class="py-line"> </tt>
2233 <a name="ETreeOnlyTestCase.test_iterparse_pis"></a><div id="ETreeOnlyTestCase.test_iterparse_pis-def"><a name="L609"></a><tt class="py-lineno"> 609</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterparse_pis-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterparse_pis');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_pis">test_iterparse_pis</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2234 </div><div id="ETreeOnlyTestCase.test_iterparse_pis-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterparse_pis-expanded"><a name="L610"></a><tt class="py-lineno"> 610</tt> <tt class="py-line"> <tt class="py-comment"># ET removes pis</tt> </tt>
2235 <a name="L611"></a><tt class="py-lineno"> 611</tt> <tt class="py-line"> <tt id="link-807" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-807', 'iterparse', 'link-782');">iterparse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-808" class="py-name"><a title="lxml.etree
2236 lxml.sax.ElementTreeContentHandler.etree
2237 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2238 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2239 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-808', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-809" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-809', 'iterparse', 'link-782');">iterparse</a></tt> </tt>
2240 <a name="L612"></a><tt class="py-lineno"> 612</tt> <tt class="py-line"> <tt id="link-810" class="py-name"><a title="lxml.etree.XSLT.tostring
2242 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-810', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-811" class="py-name"><a title="lxml.etree
2243 lxml.sax.ElementTreeContentHandler.etree
2244 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2245 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2246 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-811', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-812" class="py-name"><a title="lxml.etree.XSLT.tostring
2248 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-812', 'tostring', 'link-597');">tostring</a></tt> </tt>
2249 <a name="L613"></a><tt class="py-lineno"> 613</tt> <tt class="py-line"> <tt id="link-813" class="py-name"><a title="lxml.etree.ElementTree
2250 xml.etree.ElementTree
2251 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-813', 'ElementTree', 'link-468');">ElementTree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-814" class="py-name"><a title="lxml.etree
2252 lxml.sax.ElementTreeContentHandler.etree
2253 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2254 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2255 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-814', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-815" class="py-name"><a title="lxml.etree.ElementTree
2256 xml.etree.ElementTree
2257 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-815', 'ElementTree', 'link-468');">ElementTree</a></tt> </tt>
2258 <a name="L614"></a><tt class="py-lineno"> 614</tt> <tt class="py-line"> </tt>
2259 <a name="L615"></a><tt class="py-lineno"> 615</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">name</tt><tt class="py-op">(</tt><tt class="py-param">event</tt><tt class="py-op">,</tt> <tt class="py-param">el</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2260 <a name="L616"></a><tt class="py-lineno"> 616</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">event</tt> <tt class="py-op">==</tt> <tt class="py-string">'pi'</tt><tt class="py-op">:</tt> </tt>
2261 <a name="L617"></a><tt class="py-lineno"> 617</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-816" class="py-name"><a title="lxml.etree._BaseParser.target
2262 lxml.etree._ModifyContentOnlyPIProxy.target
2263 lxml.etree._ProcessingInstruction.target
2264 lxml.etree._ReadOnlyPIProxy.target" class="py-name" href="#" onclick="return doclink('link-816', 'target', 'link-622');">target</a></tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-817" class="py-name"><a title="lxml.etree.QName.text
2265 lxml.etree._AppendOnlyElementProxy.text
2266 lxml.etree._Element.text
2267 lxml.etree._Entity.text
2268 lxml.etree._ModifyContentOnlyProxy.text
2269 lxml.etree._ReadOnlyEntityProxy.text
2270 lxml.etree._ReadOnlyProxy.text
2271 lxml.etree.__ContentOnlyElement.text
2272 lxml.objectify.ObjectifiedElement.text
2273 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-817', 'text', 'link-194');">text</a></tt><tt class="py-op">)</tt> </tt>
2274 <a name="L618"></a><tt class="py-lineno"> 618</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
2275 <a name="L619"></a><tt class="py-lineno"> 619</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-818" class="py-name"><a title="lxml.etree._Comment.tag
2276 lxml.etree._Element.tag
2277 lxml.etree._Entity.tag
2278 lxml.etree._ProcessingInstruction.tag
2279 lxml.etree._ReadOnlyProxy.tag
2280 lxml.tests.test_xpathevaluator.tag
2281 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-818', 'tag', 'link-73');">tag</a></tt> </tt>
2282 </div><a name="L620"></a><tt class="py-lineno"> 620</tt> <tt class="py-line"> </tt>
2283 <a name="L621"></a><tt class="py-lineno"> 621</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-string">'<?pia a?><a><?pib b?><b><?pic c?><c/></b><?pid d?></a><?pie e?>'</tt><tt class="py-op">)</tt> </tt>
2284 <a name="L622"></a><tt class="py-lineno"> 622</tt> <tt class="py-line"> <tt class="py-name">events</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt id="link-819" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-819', 'iterparse', 'link-782');">iterparse</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">events</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-string">'end'</tt><tt class="py-op">,</tt> <tt class="py-string">'pi'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2285 <a name="L623"></a><tt class="py-lineno"> 623</tt> <tt class="py-line"> <tt id="link-820" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-820', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">events</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">2</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
2286 <a name="L624"></a><tt class="py-lineno"> 624</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-number">8</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">events</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2287 <a name="L625"></a><tt class="py-lineno"> 625</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-op">(</tt><tt class="py-string">'pia'</tt><tt class="py-op">,</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-string">'pib'</tt><tt class="py-op">,</tt><tt class="py-string">'b'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-string">'pic'</tt><tt class="py-op">,</tt><tt class="py-string">'c'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">,</tt> </tt>
2288 <a name="L626"></a><tt class="py-lineno"> 626</tt> <tt class="py-line"> <tt class="py-op">(</tt><tt class="py-string">'pid'</tt><tt class="py-op">,</tt><tt class="py-string">'d'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-string">'pie'</tt><tt class="py-op">,</tt><tt class="py-string">'e'</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
2289 <a name="L627"></a><tt class="py-lineno"> 627</tt> <tt class="py-line"> <tt class="py-op">[</tt> <tt id="link-821" class="py-name"><a title="lxml.etree._Entity.name
2290 lxml.etree._ModifyContentOnlyEntityProxy.name
2291 lxml.etree._ReadOnlyEntityProxy.name
2292 lxml.html.InputMixin.name
2293 lxml.objectify.PyType.name" class="py-name" href="#" onclick="return doclink('link-821', 'name', 'link-803');">name</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">events</tt> <tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
2294 <a name="L628"></a><tt class="py-lineno"> 628</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
2295 <a name="L629"></a><tt class="py-lineno"> 629</tt> <tt class="py-line"> <tt id="link-822" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-822', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<?pia a?><a><?pib b?><b><?pic c?><c/></b><?pid d?></a><?pie e?>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
2296 <a name="L630"></a><tt class="py-lineno"> 630</tt> <tt class="py-line"> <tt id="link-823" class="py-name"><a title="lxml.etree.XSLT.tostring
2298 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-823', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt id="link-824" class="py-name"><a title="lxml.etree.ElementTree
2299 xml.etree.ElementTree
2300 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-824', 'ElementTree', 'link-468');">ElementTree</a></tt><tt class="py-op">(</tt><tt id="link-825" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-825', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2301 </div><a name="L631"></a><tt class="py-lineno"> 631</tt> <tt class="py-line"> </tt>
2302 <a name="ETreeOnlyTestCase.test_iterparse_remove_comments"></a><div id="ETreeOnlyTestCase.test_iterparse_remove_comments-def"><a name="L632"></a><tt class="py-lineno"> 632</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterparse_remove_comments-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterparse_remove_comments');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_remove_comments">test_iterparse_remove_comments</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2303 </div><div id="ETreeOnlyTestCase.test_iterparse_remove_comments-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterparse_remove_comments-expanded"><a name="L633"></a><tt class="py-lineno"> 633</tt> <tt class="py-line"> <tt id="link-826" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-826', 'iterparse', 'link-782');">iterparse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-827" class="py-name"><a title="lxml.etree
2304 lxml.sax.ElementTreeContentHandler.etree
2305 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2306 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2307 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-827', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-828" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-828', 'iterparse', 'link-782');">iterparse</a></tt> </tt>
2308 <a name="L634"></a><tt class="py-lineno"> 634</tt> <tt class="py-line"> <tt id="link-829" class="py-name"><a title="lxml.etree.XSLT.tostring
2310 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-829', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-830" class="py-name"><a title="lxml.etree
2311 lxml.sax.ElementTreeContentHandler.etree
2312 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2313 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2314 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-830', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-831" class="py-name"><a title="lxml.etree.XSLT.tostring
2316 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-831', 'tostring', 'link-597');">tostring</a></tt> </tt>
2317 <a name="L635"></a><tt class="py-lineno"> 635</tt> <tt class="py-line"> </tt>
2318 <a name="L636"></a><tt class="py-lineno"> 636</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-string">'<a><!--A--><b><!-- B --><c/></b><!--C--></a>'</tt><tt class="py-op">)</tt> </tt>
2319 <a name="L637"></a><tt class="py-lineno"> 637</tt> <tt class="py-line"> <tt class="py-name">events</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt id="link-832" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-832', 'iterparse', 'link-782');">iterparse</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">remove_comments</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> </tt>
2320 <a name="L638"></a><tt class="py-lineno"> 638</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-string">'end'</tt><tt class="py-op">,</tt> <tt class="py-string">'comment'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2321 <a name="L639"></a><tt class="py-lineno"> 639</tt> <tt class="py-line"> <tt id="link-833" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-833', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">events</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
2322 <a name="L640"></a><tt class="py-lineno"> 640</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-number">3</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">events</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2323 <a name="L641"></a><tt class="py-lineno"> 641</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'c'</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
2324 <a name="L642"></a><tt class="py-lineno"> 642</tt> <tt class="py-line"> <tt class="py-op">[</tt> <tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-834" class="py-name"><a title="lxml.etree._Comment.tag
2325 lxml.etree._Element.tag
2326 lxml.etree._Entity.tag
2327 lxml.etree._ProcessingInstruction.tag
2328 lxml.etree._ReadOnlyProxy.tag
2329 lxml.tests.test_xpathevaluator.tag
2330 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-834', 'tag', 'link-73');">tag</a></tt> <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">event</tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">events</tt> <tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
2331 <a name="L643"></a><tt class="py-lineno"> 643</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
2332 <a name="L644"></a><tt class="py-lineno"> 644</tt> <tt class="py-line"> <tt id="link-835" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-835', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b><c/></b></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
2333 <a name="L645"></a><tt class="py-lineno"> 645</tt> <tt class="py-line"> <tt id="link-836" class="py-name"><a title="lxml.etree.XSLT.tostring
2335 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-836', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt id="link-837" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-837', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2336 </div><a name="L646"></a><tt class="py-lineno"> 646</tt> <tt class="py-line"> </tt>
2337 <a name="ETreeOnlyTestCase.test_iterparse_broken"></a><div id="ETreeOnlyTestCase.test_iterparse_broken-def"><a name="L647"></a><tt class="py-lineno"> 647</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterparse_broken-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterparse_broken');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_broken">test_iterparse_broken</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2338 </div><div id="ETreeOnlyTestCase.test_iterparse_broken-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterparse_broken-expanded"><a name="L648"></a><tt class="py-lineno"> 648</tt> <tt class="py-line"> <tt id="link-838" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-838', 'iterparse', 'link-782');">iterparse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-839" class="py-name"><a title="lxml.etree
2339 lxml.sax.ElementTreeContentHandler.etree
2340 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2341 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2342 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-839', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-840" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-840', 'iterparse', 'link-782');">iterparse</a></tt> </tt>
2343 <a name="L649"></a><tt class="py-lineno"> 649</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-string">'<a><b><c/></a>'</tt><tt class="py-op">)</tt> </tt>
2344 <a name="L650"></a><tt class="py-lineno"> 650</tt> <tt class="py-line"> <tt class="py-comment"># ET raises ExpatError, lxml raises XMLSyntaxError</tt> </tt>
2345 <a name="L651"></a><tt class="py-lineno"> 651</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-841" class="py-name"><a title="lxml.etree
2346 lxml.sax.ElementTreeContentHandler.etree
2347 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2348 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2349 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-841', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-842" class="py-name" targets="Class lxml.etree.XMLSyntaxError=lxml.etree.XMLSyntaxError-class.html"><a title="lxml.etree.XMLSyntaxError" class="py-name" href="#" onclick="return doclink('link-842', 'XMLSyntaxError', 'link-842');">XMLSyntaxError</a></tt><tt class="py-op">,</tt> <tt class="py-name">list</tt><tt class="py-op">,</tt> <tt id="link-843" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-843', 'iterparse', 'link-782');">iterparse</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2350 </div><a name="L652"></a><tt class="py-lineno"> 652</tt> <tt class="py-line"> </tt>
2351 <a name="ETreeOnlyTestCase.test_iterparse_strip"></a><div id="ETreeOnlyTestCase.test_iterparse_strip-def"><a name="L653"></a><tt class="py-lineno"> 653</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterparse_strip-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterparse_strip');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_strip">test_iterparse_strip</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2352 </div><div id="ETreeOnlyTestCase.test_iterparse_strip-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterparse_strip-expanded"><a name="L654"></a><tt class="py-lineno"> 654</tt> <tt class="py-line"> <tt id="link-844" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-844', 'iterparse', 'link-782');">iterparse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-845" class="py-name"><a title="lxml.etree
2353 lxml.sax.ElementTreeContentHandler.etree
2354 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2355 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2356 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-845', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-846" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-846', 'iterparse', 'link-782');">iterparse</a></tt> </tt>
2357 <a name="L655"></a><tt class="py-lineno"> 655</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-string">"""</tt> </tt>
2358 <a name="L656"></a><tt class="py-lineno"> 656</tt> <tt class="py-line"><tt class="py-string"> <a> \n \n <b> b test </b> \n</tt> </tt>
2359 <a name="L657"></a><tt class="py-lineno"> 657</tt> <tt class="py-line"><tt class="py-string"></tt> </tt>
2360 <a name="L658"></a><tt class="py-lineno"> 658</tt> <tt class="py-line"><tt class="py-string"> \n\t <c> \n </c> </a> \n """</tt><tt class="py-op">)</tt> </tt>
2361 <a name="L659"></a><tt class="py-lineno"> 659</tt> <tt class="py-line"> <tt class="py-name">iterator</tt> <tt class="py-op">=</tt> <tt id="link-847" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-847', 'iterparse', 'link-782');">iterparse</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">remove_blank_text</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
2362 <a name="L660"></a><tt class="py-lineno"> 660</tt> <tt class="py-line"> <tt id="link-848" class="py-name"><a title="lxml.etree.QName.text
2363 lxml.etree._AppendOnlyElementProxy.text
2364 lxml.etree._Element.text
2365 lxml.etree._Entity.text
2366 lxml.etree._ModifyContentOnlyProxy.text
2367 lxml.etree._ReadOnlyEntityProxy.text
2368 lxml.etree._ReadOnlyProxy.text
2369 lxml.etree.__ContentOnlyElement.text
2370 lxml.objectify.ObjectifiedElement.text
2371 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-848', 'text', 'link-194');">text</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt> <tt class="py-op">(</tt><tt class="py-name">element</tt><tt class="py-op">.</tt><tt id="link-849" class="py-name"><a title="lxml.etree.QName.text
2372 lxml.etree._AppendOnlyElementProxy.text
2373 lxml.etree._Element.text
2374 lxml.etree._Entity.text
2375 lxml.etree._ModifyContentOnlyProxy.text
2376 lxml.etree._ReadOnlyEntityProxy.text
2377 lxml.etree._ReadOnlyProxy.text
2378 lxml.etree.__ContentOnlyElement.text
2379 lxml.objectify.ObjectifiedElement.text
2380 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-849', 'text', 'link-194');">text</a></tt><tt class="py-op">,</tt> <tt class="py-name">element</tt><tt class="py-op">.</tt><tt id="link-850" class="py-name" targets="Variable lxml.etree._Element.tail=lxml.etree._Element-class.html#tail,Variable lxml.etree._ReadOnlyProxy.tail=lxml.etree._ReadOnlyProxy-class.html#tail,Variable xml.etree.ElementTree.Element.tail=xml.etree.ElementTree.Element-class.html#tail"><a title="lxml.etree._Element.tail
2381 lxml.etree._ReadOnlyProxy.tail
2382 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-850', 'tail', 'link-850');">tail</a></tt><tt class="py-op">)</tt> </tt>
2383 <a name="L661"></a><tt class="py-lineno"> 661</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">event</tt><tt class="py-op">,</tt> <tt class="py-name">element</tt> <tt class="py-keyword">in</tt> <tt class="py-name">iterator</tt> <tt class="py-op">]</tt> </tt>
2384 <a name="L662"></a><tt class="py-lineno"> 662</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
2385 <a name="L663"></a><tt class="py-lineno"> 663</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt class="py-string">" b test "</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-string">" \n "</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
2386 <a name="L664"></a><tt class="py-lineno"> 664</tt> <tt class="py-line"> <tt id="link-851" class="py-name"><a title="lxml.etree.QName.text
2387 lxml.etree._AppendOnlyElementProxy.text
2388 lxml.etree._Element.text
2389 lxml.etree._Entity.text
2390 lxml.etree._ModifyContentOnlyProxy.text
2391 lxml.etree._ReadOnlyEntityProxy.text
2392 lxml.etree._ReadOnlyProxy.text
2393 lxml.etree.__ContentOnlyElement.text
2394 lxml.objectify.ObjectifiedElement.text
2395 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-851', 'text', 'link-194');">text</a></tt><tt class="py-op">)</tt> </tt>
2396 </div><a name="L665"></a><tt class="py-lineno"> 665</tt> <tt class="py-line"> </tt>
2397 <a name="ETreeOnlyTestCase.test_iterparse_tag"></a><div id="ETreeOnlyTestCase.test_iterparse_tag-def"><a name="L666"></a><tt class="py-lineno"> 666</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterparse_tag-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterparse_tag');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_tag">test_iterparse_tag</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2398 </div><div id="ETreeOnlyTestCase.test_iterparse_tag-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterparse_tag-expanded"><a name="L667"></a><tt class="py-lineno"> 667</tt> <tt class="py-line"> <tt id="link-852" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-852', 'iterparse', 'link-782');">iterparse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-853" class="py-name"><a title="lxml.etree
2399 lxml.sax.ElementTreeContentHandler.etree
2400 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2401 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2402 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-853', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-854" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-854', 'iterparse', 'link-782');">iterparse</a></tt> </tt>
2403 <a name="L668"></a><tt class="py-lineno"> 668</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-string">'<a><b><d/></b><c/></a>'</tt><tt class="py-op">)</tt> </tt>
2404 <a name="L669"></a><tt class="py-lineno"> 669</tt> <tt class="py-line"> </tt>
2405 <a name="L670"></a><tt class="py-lineno"> 670</tt> <tt class="py-line"> <tt class="py-name">iterator</tt> <tt class="py-op">=</tt> <tt id="link-855" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-855', 'iterparse', 'link-782');">iterparse</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt id="link-856" class="py-name"><a title="lxml.etree._Comment.tag
2406 lxml.etree._Element.tag
2407 lxml.etree._Entity.tag
2408 lxml.etree._ProcessingInstruction.tag
2409 lxml.etree._ReadOnlyProxy.tag
2410 lxml.tests.test_xpathevaluator.tag
2411 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-856', 'tag', 'link-73');">tag</a></tt><tt class="py-op">=</tt><tt class="py-string">"b"</tt><tt class="py-op">,</tt> <tt class="py-name">events</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-string">'start'</tt><tt class="py-op">,</tt> <tt class="py-string">'end'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2412 <a name="L671"></a><tt class="py-lineno"> 671</tt> <tt class="py-line"> <tt class="py-name">events</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">iterator</tt><tt class="py-op">)</tt> </tt>
2413 <a name="L672"></a><tt class="py-lineno"> 672</tt> <tt class="py-line"> <tt id="link-857" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-857', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">iterator</tt><tt class="py-op">.</tt><tt id="link-858" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-858', 'root', 'link-220');">root</a></tt> </tt>
2414 <a name="L673"></a><tt class="py-lineno"> 673</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
2415 <a name="L674"></a><tt class="py-lineno"> 674</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt class="py-string">'start'</tt><tt class="py-op">,</tt> <tt id="link-859" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-859', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-string">'end'</tt><tt class="py-op">,</tt> <tt id="link-860" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-860', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
2416 <a name="L675"></a><tt class="py-lineno"> 675</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">)</tt> </tt>
2417 </div><a name="L676"></a><tt class="py-lineno"> 676</tt> <tt class="py-line"> </tt>
2418 <a name="ETreeOnlyTestCase.test_iterparse_tag_all"></a><div id="ETreeOnlyTestCase.test_iterparse_tag_all-def"><a name="L677"></a><tt class="py-lineno"> 677</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterparse_tag_all-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterparse_tag_all');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_tag_all">test_iterparse_tag_all</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2419 </div><div id="ETreeOnlyTestCase.test_iterparse_tag_all-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterparse_tag_all-expanded"><a name="L678"></a><tt class="py-lineno"> 678</tt> <tt class="py-line"> <tt id="link-861" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-861', 'iterparse', 'link-782');">iterparse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-862" class="py-name"><a title="lxml.etree
2420 lxml.sax.ElementTreeContentHandler.etree
2421 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2422 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2423 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-862', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-863" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-863', 'iterparse', 'link-782');">iterparse</a></tt> </tt>
2424 <a name="L679"></a><tt class="py-lineno"> 679</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-string">'<a><b><d/></b><c/></a>'</tt><tt class="py-op">)</tt> </tt>
2425 <a name="L680"></a><tt class="py-lineno"> 680</tt> <tt class="py-line"> </tt>
2426 <a name="L681"></a><tt class="py-lineno"> 681</tt> <tt class="py-line"> <tt class="py-name">iterator</tt> <tt class="py-op">=</tt> <tt id="link-864" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-864', 'iterparse', 'link-782');">iterparse</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt id="link-865" class="py-name"><a title="lxml.etree._Comment.tag
2427 lxml.etree._Element.tag
2428 lxml.etree._Entity.tag
2429 lxml.etree._ProcessingInstruction.tag
2430 lxml.etree._ReadOnlyProxy.tag
2431 lxml.tests.test_xpathevaluator.tag
2432 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-865', 'tag', 'link-73');">tag</a></tt><tt class="py-op">=</tt><tt class="py-string">"*"</tt><tt class="py-op">,</tt> <tt class="py-name">events</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-string">'start'</tt><tt class="py-op">,</tt> <tt class="py-string">'end'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2433 <a name="L682"></a><tt class="py-lineno"> 682</tt> <tt class="py-line"> <tt class="py-name">events</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">iterator</tt><tt class="py-op">)</tt> </tt>
2434 <a name="L683"></a><tt class="py-lineno"> 683</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
2435 <a name="L684"></a><tt class="py-lineno"> 684</tt> <tt class="py-line"> <tt class="py-number">8</tt><tt class="py-op">,</tt> </tt>
2436 <a name="L685"></a><tt class="py-lineno"> 685</tt> <tt class="py-line"> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">events</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2437 </div><a name="L686"></a><tt class="py-lineno"> 686</tt> <tt class="py-line"> </tt>
2438 <a name="ETreeOnlyTestCase.test_iterparse_tag_ns"></a><div id="ETreeOnlyTestCase.test_iterparse_tag_ns-def"><a name="L687"></a><tt class="py-lineno"> 687</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterparse_tag_ns-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterparse_tag_ns');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_tag_ns">test_iterparse_tag_ns</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2439 </div><div id="ETreeOnlyTestCase.test_iterparse_tag_ns-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterparse_tag_ns-expanded"><a name="L688"></a><tt class="py-lineno"> 688</tt> <tt class="py-line"> <tt id="link-866" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-866', 'iterparse', 'link-782');">iterparse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-867" class="py-name"><a title="lxml.etree
2440 lxml.sax.ElementTreeContentHandler.etree
2441 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2442 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2443 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-867', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-868" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-868', 'iterparse', 'link-782');">iterparse</a></tt> </tt>
2444 <a name="L689"></a><tt class="py-lineno"> 689</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-string">'<a xmlns="urn:test:1"><b><d/></b><c/></a>'</tt><tt class="py-op">)</tt> </tt>
2445 <a name="L690"></a><tt class="py-lineno"> 690</tt> <tt class="py-line"> </tt>
2446 <a name="L691"></a><tt class="py-lineno"> 691</tt> <tt class="py-line"> <tt class="py-name">iterator</tt> <tt class="py-op">=</tt> <tt id="link-869" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-869', 'iterparse', 'link-782');">iterparse</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt id="link-870" class="py-name"><a title="lxml.etree._Comment.tag
2447 lxml.etree._Element.tag
2448 lxml.etree._Entity.tag
2449 lxml.etree._ProcessingInstruction.tag
2450 lxml.etree._ReadOnlyProxy.tag
2451 lxml.tests.test_xpathevaluator.tag
2452 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-870', 'tag', 'link-73');">tag</a></tt><tt class="py-op">=</tt><tt class="py-string">"{urn:test:1}b"</tt><tt class="py-op">,</tt> <tt class="py-name">events</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-string">'start'</tt><tt class="py-op">,</tt> <tt class="py-string">'end'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2453 <a name="L692"></a><tt class="py-lineno"> 692</tt> <tt class="py-line"> <tt class="py-name">events</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">iterator</tt><tt class="py-op">)</tt> </tt>
2454 <a name="L693"></a><tt class="py-lineno"> 693</tt> <tt class="py-line"> <tt id="link-871" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-871', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">iterator</tt><tt class="py-op">.</tt><tt id="link-872" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-872', 'root', 'link-220');">root</a></tt> </tt>
2455 <a name="L694"></a><tt class="py-lineno"> 694</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
2456 <a name="L695"></a><tt class="py-lineno"> 695</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt class="py-string">'start'</tt><tt class="py-op">,</tt> <tt id="link-873" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-873', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-string">'end'</tt><tt class="py-op">,</tt> <tt id="link-874" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-874', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
2457 <a name="L696"></a><tt class="py-lineno"> 696</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">)</tt> </tt>
2458 </div><a name="L697"></a><tt class="py-lineno"> 697</tt> <tt class="py-line"> </tt>
2459 <a name="ETreeOnlyTestCase.test_iterparse_tag_ns_all"></a><div id="ETreeOnlyTestCase.test_iterparse_tag_ns_all-def"><a name="L698"></a><tt class="py-lineno"> 698</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterparse_tag_ns_all-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterparse_tag_ns_all');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_tag_ns_all">test_iterparse_tag_ns_all</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2460 </div><div id="ETreeOnlyTestCase.test_iterparse_tag_ns_all-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterparse_tag_ns_all-expanded"><a name="L699"></a><tt class="py-lineno"> 699</tt> <tt class="py-line"> <tt id="link-875" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-875', 'iterparse', 'link-782');">iterparse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-876" class="py-name"><a title="lxml.etree
2461 lxml.sax.ElementTreeContentHandler.etree
2462 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2463 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2464 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-876', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-877" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-877', 'iterparse', 'link-782');">iterparse</a></tt> </tt>
2465 <a name="L700"></a><tt class="py-lineno"> 700</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-string">'<a xmlns="urn:test:1"><b><d/></b><c/></a>'</tt><tt class="py-op">)</tt> </tt>
2466 <a name="L701"></a><tt class="py-lineno"> 701</tt> <tt class="py-line"> </tt>
2467 <a name="L702"></a><tt class="py-lineno"> 702</tt> <tt class="py-line"> <tt class="py-name">iterator</tt> <tt class="py-op">=</tt> <tt id="link-878" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-878', 'iterparse', 'link-782');">iterparse</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt id="link-879" class="py-name"><a title="lxml.etree._Comment.tag
2468 lxml.etree._Element.tag
2469 lxml.etree._Entity.tag
2470 lxml.etree._ProcessingInstruction.tag
2471 lxml.etree._ReadOnlyProxy.tag
2472 lxml.tests.test_xpathevaluator.tag
2473 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-879', 'tag', 'link-73');">tag</a></tt><tt class="py-op">=</tt><tt class="py-string">"{urn:test:1}*"</tt><tt class="py-op">,</tt> <tt class="py-name">events</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-string">'start'</tt><tt class="py-op">,</tt> <tt class="py-string">'end'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2474 <a name="L703"></a><tt class="py-lineno"> 703</tt> <tt class="py-line"> <tt class="py-name">events</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">iterator</tt><tt class="py-op">)</tt> </tt>
2475 <a name="L704"></a><tt class="py-lineno"> 704</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
2476 <a name="L705"></a><tt class="py-lineno"> 705</tt> <tt class="py-line"> <tt class="py-number">8</tt><tt class="py-op">,</tt> </tt>
2477 <a name="L706"></a><tt class="py-lineno"> 706</tt> <tt class="py-line"> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">events</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2478 </div><a name="L707"></a><tt class="py-lineno"> 707</tt> <tt class="py-line"> </tt>
2479 <a name="ETreeOnlyTestCase.test_iterparse_encoding_error"></a><div id="ETreeOnlyTestCase.test_iterparse_encoding_error-def"><a name="L708"></a><tt class="py-lineno"> 708</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterparse_encoding_error-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterparse_encoding_error');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_encoding_error">test_iterparse_encoding_error</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2480 </div><div id="ETreeOnlyTestCase.test_iterparse_encoding_error-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterparse_encoding_error-expanded"><a name="L709"></a><tt class="py-lineno"> 709</tt> <tt class="py-line"> <tt id="link-880" class="py-name"><a title="lxml.etree.QName.text
2481 lxml.etree._AppendOnlyElementProxy.text
2482 lxml.etree._Element.text
2483 lxml.etree._Entity.text
2484 lxml.etree._ModifyContentOnlyProxy.text
2485 lxml.etree._ReadOnlyEntityProxy.text
2486 lxml.etree._ReadOnlyProxy.text
2487 lxml.etree.__ContentOnlyElement.text
2488 lxml.objectify.ObjectifiedElement.text
2489 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-880', 'text', 'link-194');">text</a></tt> <tt class="py-op">=</tt> <tt id="link-881" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-881', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'Søk på nettet'</tt><tt class="py-op">)</tt> </tt>
2490 <a name="L710"></a><tt class="py-lineno"> 710</tt> <tt class="py-line"> <tt class="py-name">wrong_declaration</tt> <tt class="py-op">=</tt> <tt class="py-string">"<?xml version='1.0' encoding='UTF-8'?>"</tt> </tt>
2491 <a name="L711"></a><tt class="py-lineno"> 711</tt> <tt class="py-line"> <tt class="py-name">xml_latin1</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt id="link-882" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-882', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'%s<a>%s</a>'</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">wrong_declaration</tt><tt class="py-op">,</tt> <tt id="link-883" class="py-name"><a title="lxml.etree.QName.text
2492 lxml.etree._AppendOnlyElementProxy.text
2493 lxml.etree._Element.text
2494 lxml.etree._Entity.text
2495 lxml.etree._ModifyContentOnlyProxy.text
2496 lxml.etree._ReadOnlyEntityProxy.text
2497 lxml.etree._ReadOnlyProxy.text
2498 lxml.etree.__ContentOnlyElement.text
2499 lxml.objectify.ObjectifiedElement.text
2500 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-883', 'text', 'link-194');">text</a></tt><tt class="py-op">)</tt> </tt>
2501 <a name="L712"></a><tt class="py-lineno"> 712</tt> <tt class="py-line"> <tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">encode</tt><tt class="py-op">(</tt><tt class="py-string">'iso-8859-1'</tt><tt class="py-op">)</tt> </tt>
2502 <a name="L713"></a><tt class="py-lineno"> 713</tt> <tt class="py-line"> </tt>
2503 <a name="L714"></a><tt class="py-lineno"> 714</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-884" class="py-name"><a title="lxml.etree
2504 lxml.sax.ElementTreeContentHandler.etree
2505 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2506 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2507 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-884', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-885" class="py-name" targets="Class lxml.etree.ParseError=lxml.etree.ParseError-class.html,Class xml.etree.ElementTree.ParseError=xml.etree.ElementTree.ParseError-class.html"><a title="lxml.etree.ParseError
2508 xml.etree.ElementTree.ParseError" class="py-name" href="#" onclick="return doclink('link-885', 'ParseError', 'link-885');">ParseError</a></tt><tt class="py-op">,</tt> </tt>
2509 <a name="L715"></a><tt class="py-lineno"> 715</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-886" class="py-name"><a title="lxml.etree
2510 lxml.sax.ElementTreeContentHandler.etree
2511 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2512 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2513 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-886', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-887" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-887', 'iterparse', 'link-782');">iterparse</a></tt><tt class="py-op">(</tt><tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-name">xml_latin1</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2514 </div><a name="L716"></a><tt class="py-lineno"> 716</tt> <tt class="py-line"> </tt>
2515 <a name="ETreeOnlyTestCase.test_iterparse_encoding_8bit_override"></a><div id="ETreeOnlyTestCase.test_iterparse_encoding_8bit_override-def"><a name="L717"></a><tt class="py-lineno"> 717</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterparse_encoding_8bit_override-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterparse_encoding_8bit_override');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_encoding_8bit_override">test_iterparse_encoding_8bit_override</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2516 </div><div id="ETreeOnlyTestCase.test_iterparse_encoding_8bit_override-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterparse_encoding_8bit_override-expanded"><a name="L718"></a><tt class="py-lineno"> 718</tt> <tt class="py-line"> <tt id="link-888" class="py-name"><a title="lxml.etree.QName.text
2517 lxml.etree._AppendOnlyElementProxy.text
2518 lxml.etree._Element.text
2519 lxml.etree._Entity.text
2520 lxml.etree._ModifyContentOnlyProxy.text
2521 lxml.etree._ReadOnlyEntityProxy.text
2522 lxml.etree._ReadOnlyProxy.text
2523 lxml.etree.__ContentOnlyElement.text
2524 lxml.objectify.ObjectifiedElement.text
2525 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-888', 'text', 'link-194');">text</a></tt> <tt class="py-op">=</tt> <tt id="link-889" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-889', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'Søk på nettet'</tt><tt class="py-op">,</tt> <tt id="link-890" class="py-name" targets="Variable lxml.etree.DocInfo.encoding=lxml.etree.DocInfo-class.html#encoding"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-890', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-string">"UTF-8"</tt><tt class="py-op">)</tt> </tt>
2526 <a name="L719"></a><tt class="py-lineno"> 719</tt> <tt class="py-line"> <tt class="py-name">wrong_declaration</tt> <tt class="py-op">=</tt> <tt class="py-string">"<?xml version='1.0' encoding='UTF-8'?>"</tt> </tt>
2527 <a name="L720"></a><tt class="py-lineno"> 720</tt> <tt class="py-line"> <tt class="py-name">xml_latin1</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt id="link-891" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-891', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'%s<a>%s</a>'</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">wrong_declaration</tt><tt class="py-op">,</tt> <tt id="link-892" class="py-name"><a title="lxml.etree.QName.text
2528 lxml.etree._AppendOnlyElementProxy.text
2529 lxml.etree._Element.text
2530 lxml.etree._Entity.text
2531 lxml.etree._ModifyContentOnlyProxy.text
2532 lxml.etree._ReadOnlyEntityProxy.text
2533 lxml.etree._ReadOnlyProxy.text
2534 lxml.etree.__ContentOnlyElement.text
2535 lxml.objectify.ObjectifiedElement.text
2536 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-892', 'text', 'link-194');">text</a></tt><tt class="py-op">)</tt> </tt>
2537 <a name="L721"></a><tt class="py-lineno"> 721</tt> <tt class="py-line"> <tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">encode</tt><tt class="py-op">(</tt><tt class="py-string">'iso-8859-1'</tt><tt class="py-op">)</tt> </tt>
2538 <a name="L722"></a><tt class="py-lineno"> 722</tt> <tt class="py-line"> </tt>
2539 <a name="L723"></a><tt class="py-lineno"> 723</tt> <tt class="py-line"> <tt class="py-name">iterator</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-893" class="py-name"><a title="lxml.etree
2540 lxml.sax.ElementTreeContentHandler.etree
2541 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2542 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2543 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-893', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-894" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-894', 'iterparse', 'link-782');">iterparse</a></tt><tt class="py-op">(</tt><tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-name">xml_latin1</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
2544 <a name="L724"></a><tt class="py-lineno"> 724</tt> <tt class="py-line"> <tt id="link-895" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-895', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-string">"iso-8859-1"</tt><tt class="py-op">)</tt> </tt>
2545 <a name="L725"></a><tt class="py-lineno"> 725</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">iterator</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2546 <a name="L726"></a><tt class="py-lineno"> 726</tt> <tt class="py-line"> </tt>
2547 <a name="L727"></a><tt class="py-lineno"> 727</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt class="py-name">iterator</tt><tt class="py-op">.</tt><tt id="link-896" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-896', 'root', 'link-220');">root</a></tt> </tt>
2548 <a name="L728"></a><tt class="py-lineno"> 728</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-897" class="py-name"><a title="lxml.etree.QName.text
2549 lxml.etree._AppendOnlyElementProxy.text
2550 lxml.etree._Element.text
2551 lxml.etree._Entity.text
2552 lxml.etree._ModifyContentOnlyProxy.text
2553 lxml.etree._ReadOnlyEntityProxy.text
2554 lxml.etree._ReadOnlyProxy.text
2555 lxml.etree.__ContentOnlyElement.text
2556 lxml.objectify.ObjectifiedElement.text
2557 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-897', 'text', 'link-194');">text</a></tt><tt class="py-op">,</tt> <tt id="link-898" class="py-name"><a title="lxml.etree.QName.text
2558 lxml.etree._AppendOnlyElementProxy.text
2559 lxml.etree._Element.text
2560 lxml.etree._Entity.text
2561 lxml.etree._ModifyContentOnlyProxy.text
2562 lxml.etree._ReadOnlyEntityProxy.text
2563 lxml.etree._ReadOnlyProxy.text
2564 lxml.etree.__ContentOnlyElement.text
2565 lxml.objectify.ObjectifiedElement.text
2566 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-898', 'text', 'link-194');">text</a></tt><tt class="py-op">)</tt> </tt>
2567 </div><a name="L729"></a><tt class="py-lineno"> 729</tt> <tt class="py-line"> </tt>
2568 <a name="ETreeOnlyTestCase.test_iterparse_keep_cdata"></a><div id="ETreeOnlyTestCase.test_iterparse_keep_cdata-def"><a name="L730"></a><tt class="py-lineno"> 730</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterparse_keep_cdata-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterparse_keep_cdata');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_keep_cdata">test_iterparse_keep_cdata</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2569 </div><div id="ETreeOnlyTestCase.test_iterparse_keep_cdata-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterparse_keep_cdata-expanded"><a name="L731"></a><tt class="py-lineno"> 731</tt> <tt class="py-line"> <tt id="link-899" class="py-name"><a title="lxml.etree.XSLT.tostring
2571 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-899', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-900" class="py-name"><a title="lxml.etree
2572 lxml.sax.ElementTreeContentHandler.etree
2573 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2574 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2575 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-900', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-901" class="py-name"><a title="lxml.etree.XSLT.tostring
2577 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-901', 'tostring', 'link-597');">tostring</a></tt> </tt>
2578 <a name="L732"></a><tt class="py-lineno"> 732</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-string">'<root><![CDATA[test]]></root>'</tt><tt class="py-op">)</tt> </tt>
2579 <a name="L733"></a><tt class="py-lineno"> 733</tt> <tt class="py-line"> <tt class="py-name">context</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-902" class="py-name"><a title="lxml.etree
2580 lxml.sax.ElementTreeContentHandler.etree
2581 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2582 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2583 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-902', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-903" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-903', 'iterparse', 'link-782');">iterparse</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">strip_cdata</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
2584 <a name="L734"></a><tt class="py-lineno"> 734</tt> <tt class="py-line"> <tt class="py-name">content</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt> <tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-904" class="py-name"><a title="lxml.etree.QName.text
2585 lxml.etree._AppendOnlyElementProxy.text
2586 lxml.etree._Element.text
2587 lxml.etree._Entity.text
2588 lxml.etree._ModifyContentOnlyProxy.text
2589 lxml.etree._ReadOnlyEntityProxy.text
2590 lxml.etree._ReadOnlyProxy.text
2591 lxml.etree.__ContentOnlyElement.text
2592 lxml.objectify.ObjectifiedElement.text
2593 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-904', 'text', 'link-194');">text</a></tt> <tt class="py-keyword">for</tt> <tt class="py-name">event</tt><tt class="py-op">,</tt><tt class="py-name">el</tt> <tt class="py-keyword">in</tt> <tt class="py-name">context</tt> <tt class="py-op">]</tt> </tt>
2594 <a name="L735"></a><tt class="py-lineno"> 735</tt> <tt class="py-line"> </tt>
2595 <a name="L736"></a><tt class="py-lineno"> 736</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'test'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">content</tt><tt class="py-op">)</tt> </tt>
2596 <a name="L737"></a><tt class="py-lineno"> 737</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-905" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-905', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root><![CDATA[test]]></root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
2597 <a name="L738"></a><tt class="py-lineno"> 738</tt> <tt class="py-line"> <tt id="link-906" class="py-name"><a title="lxml.etree.XSLT.tostring
2599 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-906', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">context</tt><tt class="py-op">.</tt><tt id="link-907" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-907', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2600 </div><a name="L739"></a><tt class="py-lineno"> 739</tt> <tt class="py-line"> </tt>
2601 <a name="ETreeOnlyTestCase.test_parser_encoding_unknown"></a><div id="ETreeOnlyTestCase.test_parser_encoding_unknown-def"><a name="L740"></a><tt class="py-lineno"> 740</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_parser_encoding_unknown-toggle" onclick="return toggle('ETreeOnlyTestCase.test_parser_encoding_unknown');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parser_encoding_unknown">test_parser_encoding_unknown</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2602 </div><div id="ETreeOnlyTestCase.test_parser_encoding_unknown-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_parser_encoding_unknown-expanded"><a name="L741"></a><tt class="py-lineno"> 741</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt> </tt>
2603 <a name="L742"></a><tt class="py-lineno"> 742</tt> <tt class="py-line"> <tt class="py-name">LookupError</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-908" class="py-name"><a title="lxml.etree
2604 lxml.sax.ElementTreeContentHandler.etree
2605 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2606 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2607 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-908', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-909" class="py-name"><a title="lxml.etree.XMLParser
2608 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-909', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">,</tt> <tt id="link-910" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-910', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-string">"hopefully unknown"</tt><tt class="py-op">)</tt> </tt>
2609 </div><a name="L743"></a><tt class="py-lineno"> 743</tt> <tt class="py-line"> </tt>
2610 <a name="ETreeOnlyTestCase.test_parser_encoding"></a><div id="ETreeOnlyTestCase.test_parser_encoding-def"><a name="L744"></a><tt class="py-lineno"> 744</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_parser_encoding-toggle" onclick="return toggle('ETreeOnlyTestCase.test_parser_encoding');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parser_encoding">test_parser_encoding</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2611 </div><div id="ETreeOnlyTestCase.test_parser_encoding-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_parser_encoding-expanded"><a name="L745"></a><tt class="py-lineno"> 745</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-911" class="py-name"><a title="lxml.etree
2612 lxml.sax.ElementTreeContentHandler.etree
2613 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2614 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2615 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-911', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-912" class="py-name"><a title="lxml.etree.XMLParser
2616 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-912', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt id="link-913" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-913', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-string">"ascii"</tt><tt class="py-op">)</tt> </tt>
2617 <a name="L746"></a><tt class="py-lineno"> 746</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-914" class="py-name"><a title="lxml.etree
2618 lxml.sax.ElementTreeContentHandler.etree
2619 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2620 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2621 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-914', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-915" class="py-name"><a title="lxml.etree.XMLParser
2622 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-915', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt id="link-916" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-916', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-string">"utf-8"</tt><tt class="py-op">)</tt> </tt>
2623 <a name="L747"></a><tt class="py-lineno"> 747</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-917" class="py-name"><a title="lxml.etree
2624 lxml.sax.ElementTreeContentHandler.etree
2625 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2626 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2627 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-917', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-918" class="py-name"><a title="lxml.etree.XMLParser
2628 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-918', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt id="link-919" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-919', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-string">"iso-8859-1"</tt><tt class="py-op">)</tt> </tt>
2629 </div><a name="L748"></a><tt class="py-lineno"> 748</tt> <tt class="py-line"> </tt>
2630 <a name="ETreeOnlyTestCase.test_feed_parser_recover"></a><div id="ETreeOnlyTestCase.test_feed_parser_recover-def"><a name="L749"></a><tt class="py-lineno"> 749</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_feed_parser_recover-toggle" onclick="return toggle('ETreeOnlyTestCase.test_feed_parser_recover');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_feed_parser_recover">test_feed_parser_recover</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2631 </div><div id="ETreeOnlyTestCase.test_feed_parser_recover-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_feed_parser_recover-expanded"><a name="L750"></a><tt class="py-lineno"> 750</tt> <tt class="py-line"> <tt id="link-920" class="py-name"><a title="lxml.etree._ElementTree.parser
2632 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-920', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-921" class="py-name"><a title="lxml.etree
2633 lxml.sax.ElementTreeContentHandler.etree
2634 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2635 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2636 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-921', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-922" class="py-name"><a title="lxml.etree.XMLParser
2637 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-922', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt class="py-name">recover</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
2638 <a name="L751"></a><tt class="py-lineno"> 751</tt> <tt class="py-line"> </tt>
2639 <a name="L752"></a><tt class="py-lineno"> 752</tt> <tt class="py-line"> <tt id="link-923" class="py-name"><a title="lxml.etree._ElementTree.parser
2640 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-923', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-924" class="py-name" targets="Method lxml.etree._FeedParser.feed()=lxml.etree._FeedParser-class.html#feed"><a title="lxml.etree._FeedParser.feed" class="py-name" href="#" onclick="return doclink('link-924', 'feed', 'link-924');">feed</a></tt><tt class="py-op">(</tt><tt class="py-string">'<?xml version='</tt><tt class="py-op">)</tt> </tt>
2641 <a name="L753"></a><tt class="py-lineno"> 753</tt> <tt class="py-line"> <tt id="link-925" class="py-name"><a title="lxml.etree._ElementTree.parser
2642 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-925', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-926" class="py-name"><a title="lxml.etree._FeedParser.feed" class="py-name" href="#" onclick="return doclink('link-926', 'feed', 'link-924');">feed</a></tt><tt class="py-op">(</tt><tt class="py-string">'"1.0"?><ro'</tt><tt class="py-op">)</tt> </tt>
2643 <a name="L754"></a><tt class="py-lineno"> 754</tt> <tt class="py-line"> <tt id="link-927" class="py-name"><a title="lxml.etree._ElementTree.parser
2644 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-927', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-928" class="py-name"><a title="lxml.etree._FeedParser.feed" class="py-name" href="#" onclick="return doclink('link-928', 'feed', 'link-924');">feed</a></tt><tt class="py-op">(</tt><tt class="py-string">'ot><'</tt><tt class="py-op">)</tt> </tt>
2645 <a name="L755"></a><tt class="py-lineno"> 755</tt> <tt class="py-line"> <tt id="link-929" class="py-name"><a title="lxml.etree._ElementTree.parser
2646 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-929', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-930" class="py-name"><a title="lxml.etree._FeedParser.feed" class="py-name" href="#" onclick="return doclink('link-930', 'feed', 'link-924');">feed</a></tt><tt class="py-op">(</tt><tt class="py-string">'a test="works"'</tt><tt class="py-op">)</tt> </tt>
2647 <a name="L756"></a><tt class="py-lineno"> 756</tt> <tt class="py-line"> <tt id="link-931" class="py-name"><a title="lxml.etree._ElementTree.parser
2648 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-931', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-932" class="py-name"><a title="lxml.etree._FeedParser.feed" class="py-name" href="#" onclick="return doclink('link-932', 'feed', 'link-924');">feed</a></tt><tt class="py-op">(</tt><tt class="py-string">'><othertag/></root'</tt><tt class="py-op">)</tt> <tt class="py-comment"># <a> not closed!</tt> </tt>
2649 <a name="L757"></a><tt class="py-lineno"> 757</tt> <tt class="py-line"> <tt id="link-933" class="py-name"><a title="lxml.etree._ElementTree.parser
2650 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-933', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-934" class="py-name"><a title="lxml.etree._FeedParser.feed" class="py-name" href="#" onclick="return doclink('link-934', 'feed', 'link-924');">feed</a></tt><tt class="py-op">(</tt><tt class="py-string">'>'</tt><tt class="py-op">)</tt> </tt>
2651 <a name="L758"></a><tt class="py-lineno"> 758</tt> <tt class="py-line"> </tt>
2652 <a name="L759"></a><tt class="py-lineno"> 759</tt> <tt class="py-line"> <tt id="link-935" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-935', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-936" class="py-name"><a title="lxml.etree._ElementTree.parser
2653 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-936', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-937" class="py-name" targets="Method lxml.etree.TreeBuilder.close()=lxml.etree.TreeBuilder-class.html#close,Method lxml.etree._FeedParser.close()=lxml.etree._FeedParser-class.html#close"><a title="lxml.etree.TreeBuilder.close
2654 lxml.etree._FeedParser.close" class="py-name" href="#" onclick="return doclink('link-937', 'close', 'link-937');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
2655 <a name="L760"></a><tt class="py-lineno"> 760</tt> <tt class="py-line"> </tt>
2656 <a name="L761"></a><tt class="py-lineno"> 761</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-938" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-938', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-939" class="py-name"><a title="lxml.etree._Comment.tag
2657 lxml.etree._Element.tag
2658 lxml.etree._Entity.tag
2659 lxml.etree._ProcessingInstruction.tag
2660 lxml.etree._ReadOnlyProxy.tag
2661 lxml.tests.test_xpathevaluator.tag
2662 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-939', 'tag', 'link-73');">tag</a></tt><tt class="py-op">,</tt> <tt class="py-string">"root"</tt><tt class="py-op">)</tt> </tt>
2663 <a name="L762"></a><tt class="py-lineno"> 762</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt id="link-940" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-940', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
2664 <a name="L763"></a><tt class="py-lineno"> 763</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-941" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-941', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-942" class="py-name"><a title="lxml.etree._Comment.tag
2665 lxml.etree._Element.tag
2666 lxml.etree._Entity.tag
2667 lxml.etree._ProcessingInstruction.tag
2668 lxml.etree._ReadOnlyProxy.tag
2669 lxml.tests.test_xpathevaluator.tag
2670 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-942', 'tag', 'link-73');">tag</a></tt><tt class="py-op">,</tt> <tt class="py-string">"a"</tt><tt class="py-op">)</tt> </tt>
2671 <a name="L764"></a><tt class="py-lineno"> 764</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-943" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-943', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-944" class="py-name"><a title="lxml.etree._Attrib.get
2672 lxml.etree._Element.get
2673 lxml.etree._IDDict.get
2674 lxml.etree._ProcessingInstruction.get
2675 lxml.etree._ReadOnlyElementProxy.get
2676 lxml.etree.__ContentOnlyElement.get" class="py-name" href="#" onclick="return doclink('link-944', 'get', 'link-243');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">"test"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">"works"</tt><tt class="py-op">)</tt> </tt>
2677 <a name="L765"></a><tt class="py-lineno"> 765</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt id="link-945" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-945', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
2678 <a name="L766"></a><tt class="py-lineno"> 766</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-946" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-946', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-947" class="py-name"><a title="lxml.etree._Comment.tag
2679 lxml.etree._Element.tag
2680 lxml.etree._Entity.tag
2681 lxml.etree._ProcessingInstruction.tag
2682 lxml.etree._ReadOnlyProxy.tag
2683 lxml.tests.test_xpathevaluator.tag
2684 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-947', 'tag', 'link-73');">tag</a></tt><tt class="py-op">,</tt> <tt class="py-string">"othertag"</tt><tt class="py-op">)</tt> </tt>
2685 </div><a name="L767"></a><tt class="py-lineno"> 767</tt> <tt class="py-line"> <tt class="py-comment"># FIXME: would be nice to get some errors logged ...</tt> </tt>
2686 <a name="L768"></a><tt class="py-lineno"> 768</tt> <tt class="py-line"> <tt class="py-comment">#self.assert_(len(parser.error_log) > 0, "error log is empty")</tt> </tt>
2687 <a name="L769"></a><tt class="py-lineno"> 769</tt> <tt class="py-line"> </tt>
2688 <a name="ETreeOnlyTestCase.test_elementtree_parser_target_type_error"></a><div id="ETreeOnlyTestCase.test_elementtree_parser_target_type_error-def"><a name="L770"></a><tt class="py-lineno"> 770</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_elementtree_parser_target_type_error-toggle" onclick="return toggle('ETreeOnlyTestCase.test_elementtree_parser_target_type_error');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_elementtree_parser_target_type_error">test_elementtree_parser_target_type_error</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2689 </div><div id="ETreeOnlyTestCase.test_elementtree_parser_target_type_error-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_elementtree_parser_target_type_error-expanded"><a name="L771"></a><tt class="py-lineno"> 771</tt> <tt class="py-line"> <tt class="py-name">assertEquals</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt> </tt>
2690 <a name="L772"></a><tt class="py-lineno"> 772</tt> <tt class="py-line"> <tt id="link-948" class="py-name" targets="Variable lxml.tests.common_imports.HelperTestCase.assertFalse=lxml.tests.common_imports.HelperTestCase-class.html#assertFalse"><a title="lxml.tests.common_imports.HelperTestCase.assertFalse" class="py-name" href="#" onclick="return doclink('link-948', 'assertFalse', 'link-948');">assertFalse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-949" class="py-name"><a title="lxml.tests.common_imports.HelperTestCase.assertFalse" class="py-name" href="#" onclick="return doclink('link-949', 'assertFalse', 'link-948');">assertFalse</a></tt> </tt>
2691 <a name="L773"></a><tt class="py-lineno"> 773</tt> <tt class="py-line"> </tt>
2692 <a name="L774"></a><tt class="py-lineno"> 774</tt> <tt class="py-line"> <tt class="py-name">events</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
2693 <a name="L775"></a><tt class="py-lineno"> 775</tt> <tt class="py-line"> <tt class="py-keyword">class</tt> <tt class="py-def-name">Target</tt><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2694 <a name="L776"></a><tt class="py-lineno"> 776</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">start</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tag</tt><tt class="py-op">,</tt> <tt class="py-param">attrib</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2695 <a name="L777"></a><tt class="py-lineno"> 777</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-950" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
2696 lxml.etree._Element.append
2697 lxml.etree._OpaqueDocumentWrapper.append
2698 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-950', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"start"</tt><tt class="py-op">)</tt> </tt>
2699 <a name="L778"></a><tt class="py-lineno"> 778</tt> <tt class="py-line"> <tt id="link-951" class="py-name"><a title="lxml.tests.common_imports.HelperTestCase.assertFalse" class="py-name" href="#" onclick="return doclink('link-951', 'assertFalse', 'link-948');">assertFalse</a></tt><tt class="py-op">(</tt><tt id="link-952" class="py-name"><a title="lxml.etree._Element.attrib
2700 lxml.etree._ProcessingInstruction.attrib
2701 lxml.etree._ReadOnlyElementProxy.attrib
2702 lxml.etree.__ContentOnlyElement.attrib
2703 xml.etree.ElementTree.Element.attrib" class="py-name" href="#" onclick="return doclink('link-952', 'attrib', 'link-224');">attrib</a></tt><tt class="py-op">)</tt> </tt>
2704 <a name="L779"></a><tt class="py-lineno"> 779</tt> <tt class="py-line"> <tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-string">"TAG"</tt><tt class="py-op">,</tt> <tt id="link-953" class="py-name"><a title="lxml.etree._Comment.tag
2705 lxml.etree._Element.tag
2706 lxml.etree._Entity.tag
2707 lxml.etree._ProcessingInstruction.tag
2708 lxml.etree._ReadOnlyProxy.tag
2709 lxml.tests.test_xpathevaluator.tag
2710 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-953', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
2711 </div><a name="L780"></a><tt class="py-lineno"> 780</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">end</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tag</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2712 <a name="L781"></a><tt class="py-lineno"> 781</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-954" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
2713 lxml.etree._Element.append
2714 lxml.etree._OpaqueDocumentWrapper.append
2715 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-954', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"end"</tt><tt class="py-op">)</tt> </tt>
2716 <a name="L782"></a><tt class="py-lineno"> 782</tt> <tt class="py-line"> <tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-string">"TAG"</tt><tt class="py-op">,</tt> <tt id="link-955" class="py-name"><a title="lxml.etree._Comment.tag
2717 lxml.etree._Element.tag
2718 lxml.etree._Entity.tag
2719 lxml.etree._ProcessingInstruction.tag
2720 lxml.etree._ReadOnlyProxy.tag
2721 lxml.tests.test_xpathevaluator.tag
2722 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-955', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
2723 </div><a name="L783"></a><tt class="py-lineno"> 783</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">close</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2724 <a name="L784"></a><tt class="py-lineno"> 784</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">"DONE"</tt> <tt class="py-comment"># no Element!</tt> </tt>
2725 </div></div><a name="L785"></a><tt class="py-lineno"> 785</tt> <tt class="py-line"> </tt>
2726 <a name="L786"></a><tt class="py-lineno"> 786</tt> <tt class="py-line"> <tt id="link-956" class="py-name"><a title="lxml.etree._ElementTree.parser
2727 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-956', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-957" class="py-name"><a title="lxml.etree
2728 lxml.sax.ElementTreeContentHandler.etree
2729 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2730 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2731 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-957', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-958" class="py-name"><a title="lxml.etree.XMLParser
2732 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-958', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt id="link-959" class="py-name"><a title="lxml.etree._BaseParser.target
2733 lxml.etree._ModifyContentOnlyPIProxy.target
2734 lxml.etree._ProcessingInstruction.target
2735 lxml.etree._ReadOnlyPIProxy.target" class="py-name" href="#" onclick="return doclink('link-959', 'target', 'link-622');">target</a></tt><tt class="py-op">=</tt><tt class="py-name">Target</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2736 <a name="L787"></a><tt class="py-lineno"> 787</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-960" class="py-name"><a title="lxml.etree
2737 lxml.sax.ElementTreeContentHandler.etree
2738 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2739 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2740 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-960', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-961" class="py-name"><a title="lxml.etree.ElementTree
2741 xml.etree.ElementTree
2742 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-961', 'ElementTree', 'link-468');">ElementTree</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
2743 <a name="L788"></a><tt class="py-lineno"> 788</tt> <tt class="py-line"> </tt>
2744 <a name="L789"></a><tt class="py-lineno"> 789</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">TypeError</tt><tt class="py-op">,</tt> </tt>
2745 <a name="L790"></a><tt class="py-lineno"> 790</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-962" class="py-name"><a title="lxml.cssselect.parse
2746 lxml.etree._ElementTree.parse
2748 lxml.html.ElementSoup.parse
2749 lxml.html.html5parser.parse
2751 lxml.html.soupparser.parse
2752 lxml.objectify.parse
2753 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-962', 'parse', 'link-757');">parse</a></tt><tt class="py-op">,</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-string">"<TAG/>"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-963" class="py-name"><a title="lxml.etree._ElementTree.parser
2754 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-963', 'parser', 'link-748');">parser</a></tt><tt class="py-op">=</tt><tt id="link-964" class="py-name"><a title="lxml.etree._ElementTree.parser
2755 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-964', 'parser', 'link-748');">parser</a></tt><tt class="py-op">)</tt> </tt>
2756 <a name="L791"></a><tt class="py-lineno"> 791</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">"start"</tt><tt class="py-op">,</tt> <tt class="py-string">"end"</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">events</tt><tt class="py-op">)</tt> </tt>
2757 </div><a name="L792"></a><tt class="py-lineno"> 792</tt> <tt class="py-line"> </tt>
2758 <a name="ETreeOnlyTestCase.test_parser_target_feed_exception"></a><div id="ETreeOnlyTestCase.test_parser_target_feed_exception-def"><a name="L793"></a><tt class="py-lineno"> 793</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_parser_target_feed_exception-toggle" onclick="return toggle('ETreeOnlyTestCase.test_parser_target_feed_exception');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parser_target_feed_exception">test_parser_target_feed_exception</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2759 </div><div id="ETreeOnlyTestCase.test_parser_target_feed_exception-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_parser_target_feed_exception-expanded"><a name="L794"></a><tt class="py-lineno"> 794</tt> <tt class="py-line"> <tt class="py-comment"># ET doesn't call .close() on errors</tt> </tt>
2760 <a name="L795"></a><tt class="py-lineno"> 795</tt> <tt class="py-line"> <tt class="py-name">events</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
2761 <a name="L796"></a><tt class="py-lineno"> 796</tt> <tt class="py-line"> <tt class="py-keyword">class</tt> <tt class="py-def-name">Target</tt><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2762 <a name="L797"></a><tt class="py-lineno"> 797</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">start</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tag</tt><tt class="py-op">,</tt> <tt class="py-param">attrib</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2763 <a name="L798"></a><tt class="py-lineno"> 798</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-965" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
2764 lxml.etree._Element.append
2765 lxml.etree._OpaqueDocumentWrapper.append
2766 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-965', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"start-"</tt> <tt class="py-op">+</tt> <tt id="link-966" class="py-name"><a title="lxml.etree._Comment.tag
2767 lxml.etree._Element.tag
2768 lxml.etree._Entity.tag
2769 lxml.etree._ProcessingInstruction.tag
2770 lxml.etree._ReadOnlyProxy.tag
2771 lxml.tests.test_xpathevaluator.tag
2772 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-966', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
2773 </div><a name="L799"></a><tt class="py-lineno"> 799</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">end</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tag</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2774 <a name="L800"></a><tt class="py-lineno"> 800</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-967" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
2775 lxml.etree._Element.append
2776 lxml.etree._OpaqueDocumentWrapper.append
2777 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-967', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"end-"</tt> <tt class="py-op">+</tt> <tt id="link-968" class="py-name"><a title="lxml.etree._Comment.tag
2778 lxml.etree._Element.tag
2779 lxml.etree._Entity.tag
2780 lxml.etree._ProcessingInstruction.tag
2781 lxml.etree._ReadOnlyProxy.tag
2782 lxml.tests.test_xpathevaluator.tag
2783 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-968', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
2784 <a name="L801"></a><tt class="py-lineno"> 801</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-969" class="py-name"><a title="lxml.etree._Comment.tag
2785 lxml.etree._Element.tag
2786 lxml.etree._Entity.tag
2787 lxml.etree._ProcessingInstruction.tag
2788 lxml.etree._ReadOnlyProxy.tag
2789 lxml.tests.test_xpathevaluator.tag
2790 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-969', 'tag', 'link-73');">tag</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'a'</tt><tt class="py-op">:</tt> </tt>
2791 <a name="L802"></a><tt class="py-lineno"> 802</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"dead and gone"</tt><tt class="py-op">)</tt> </tt>
2792 </div><a name="L803"></a><tt class="py-lineno"> 803</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">data</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2793 <a name="L804"></a><tt class="py-lineno"> 804</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-970" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
2794 lxml.etree._Element.append
2795 lxml.etree._OpaqueDocumentWrapper.append
2796 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-970', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"data-"</tt> <tt class="py-op">+</tt> <tt id="link-971" class="py-name" targets="Method lxml.etree.TreeBuilder.data()=lxml.etree.TreeBuilder-class.html#data"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-971', 'data', 'link-971');">data</a></tt><tt class="py-op">)</tt> </tt>
2797 </div><a name="L805"></a><tt class="py-lineno"> 805</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">close</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2798 <a name="L806"></a><tt class="py-lineno"> 806</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-972" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
2799 lxml.etree._Element.append
2800 lxml.etree._OpaqueDocumentWrapper.append
2801 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-972', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"close"</tt><tt class="py-op">)</tt> </tt>
2802 <a name="L807"></a><tt class="py-lineno"> 807</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">"DONE"</tt> </tt>
2803 </div></div><a name="L808"></a><tt class="py-lineno"> 808</tt> <tt class="py-line"> </tt>
2804 <a name="L809"></a><tt class="py-lineno"> 809</tt> <tt class="py-line"> <tt id="link-973" class="py-name"><a title="lxml.etree._ElementTree.parser
2805 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-973', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-974" class="py-name"><a title="lxml.etree
2806 lxml.sax.ElementTreeContentHandler.etree
2807 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2808 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2809 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-974', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-975" class="py-name"><a title="lxml.etree.XMLParser
2810 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-975', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt id="link-976" class="py-name"><a title="lxml.etree._BaseParser.target
2811 lxml.etree._ModifyContentOnlyPIProxy.target
2812 lxml.etree._ProcessingInstruction.target
2813 lxml.etree._ReadOnlyPIProxy.target" class="py-name" href="#" onclick="return doclink('link-976', 'target', 'link-622');">target</a></tt><tt class="py-op">=</tt><tt class="py-name">Target</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2814 <a name="L810"></a><tt class="py-lineno"> 810</tt> <tt class="py-line"> </tt>
2815 <a name="L811"></a><tt class="py-lineno"> 811</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
2816 <a name="L812"></a><tt class="py-lineno"> 812</tt> <tt class="py-line"> <tt id="link-977" class="py-name"><a title="lxml.etree._ElementTree.parser
2817 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-977', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-978" class="py-name"><a title="lxml.etree._FeedParser.feed" class="py-name" href="#" onclick="return doclink('link-978', 'feed', 'link-924');">feed</a></tt><tt class="py-op">(</tt><tt id="link-979" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-979', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root>A<a>ca</a>B</root>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2818 <a name="L813"></a><tt class="py-lineno"> 813</tt> <tt class="py-line"> <tt class="py-name">done</tt> <tt class="py-op">=</tt> <tt id="link-980" class="py-name"><a title="lxml.etree._ElementTree.parser
2819 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-980', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-981" class="py-name"><a title="lxml.etree.TreeBuilder.close
2820 lxml.etree._FeedParser.close" class="py-name" href="#" onclick="return doclink('link-981', 'close', 'link-937');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
2821 <a name="L814"></a><tt class="py-lineno"> 814</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fail</tt><tt class="py-op">(</tt><tt class="py-string">"error expected, but parsing succeeded"</tt><tt class="py-op">)</tt> </tt>
2822 <a name="L815"></a><tt class="py-lineno"> 815</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
2823 <a name="L816"></a><tt class="py-lineno"> 816</tt> <tt class="py-line"> <tt class="py-name">done</tt> <tt class="py-op">=</tt> <tt class="py-string">'value error received as expected'</tt> </tt>
2824 <a name="L817"></a><tt class="py-lineno"> 817</tt> <tt class="py-line"> </tt>
2825 <a name="L818"></a><tt class="py-lineno"> 818</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">"start-root"</tt><tt class="py-op">,</tt> <tt class="py-string">"data-A"</tt><tt class="py-op">,</tt> <tt class="py-string">"start-a"</tt><tt class="py-op">,</tt> </tt>
2826 <a name="L819"></a><tt class="py-lineno"> 819</tt> <tt class="py-line"> <tt class="py-string">"data-ca"</tt><tt class="py-op">,</tt> <tt class="py-string">"end-a"</tt><tt class="py-op">,</tt> <tt class="py-string">"close"</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
2827 <a name="L820"></a><tt class="py-lineno"> 820</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">)</tt> </tt>
2828 </div><a name="L821"></a><tt class="py-lineno"> 821</tt> <tt class="py-line"> </tt>
2829 <a name="ETreeOnlyTestCase.test_parser_target_fromstring_exception"></a><div id="ETreeOnlyTestCase.test_parser_target_fromstring_exception-def"><a name="L822"></a><tt class="py-lineno"> 822</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_parser_target_fromstring_exception-toggle" onclick="return toggle('ETreeOnlyTestCase.test_parser_target_fromstring_exception');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parser_target_fromstring_exception">test_parser_target_fromstring_exception</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2830 </div><div id="ETreeOnlyTestCase.test_parser_target_fromstring_exception-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_parser_target_fromstring_exception-expanded"><a name="L823"></a><tt class="py-lineno"> 823</tt> <tt class="py-line"> <tt class="py-comment"># ET doesn't call .close() on errors</tt> </tt>
2831 <a name="L824"></a><tt class="py-lineno"> 824</tt> <tt class="py-line"> <tt class="py-name">events</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
2832 <a name="L825"></a><tt class="py-lineno"> 825</tt> <tt class="py-line"> <tt class="py-keyword">class</tt> <tt class="py-def-name">Target</tt><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2833 <a name="L826"></a><tt class="py-lineno"> 826</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">start</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tag</tt><tt class="py-op">,</tt> <tt class="py-param">attrib</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2834 <a name="L827"></a><tt class="py-lineno"> 827</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-982" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
2835 lxml.etree._Element.append
2836 lxml.etree._OpaqueDocumentWrapper.append
2837 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-982', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"start-"</tt> <tt class="py-op">+</tt> <tt id="link-983" class="py-name"><a title="lxml.etree._Comment.tag
2838 lxml.etree._Element.tag
2839 lxml.etree._Entity.tag
2840 lxml.etree._ProcessingInstruction.tag
2841 lxml.etree._ReadOnlyProxy.tag
2842 lxml.tests.test_xpathevaluator.tag
2843 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-983', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
2844 </div><a name="L828"></a><tt class="py-lineno"> 828</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">end</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tag</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2845 <a name="L829"></a><tt class="py-lineno"> 829</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-984" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
2846 lxml.etree._Element.append
2847 lxml.etree._OpaqueDocumentWrapper.append
2848 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-984', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"end-"</tt> <tt class="py-op">+</tt> <tt id="link-985" class="py-name"><a title="lxml.etree._Comment.tag
2849 lxml.etree._Element.tag
2850 lxml.etree._Entity.tag
2851 lxml.etree._ProcessingInstruction.tag
2852 lxml.etree._ReadOnlyProxy.tag
2853 lxml.tests.test_xpathevaluator.tag
2854 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-985', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
2855 <a name="L830"></a><tt class="py-lineno"> 830</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-986" class="py-name"><a title="lxml.etree._Comment.tag
2856 lxml.etree._Element.tag
2857 lxml.etree._Entity.tag
2858 lxml.etree._ProcessingInstruction.tag
2859 lxml.etree._ReadOnlyProxy.tag
2860 lxml.tests.test_xpathevaluator.tag
2861 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-986', 'tag', 'link-73');">tag</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'a'</tt><tt class="py-op">:</tt> </tt>
2862 <a name="L831"></a><tt class="py-lineno"> 831</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"dead and gone"</tt><tt class="py-op">)</tt> </tt>
2863 </div><a name="L832"></a><tt class="py-lineno"> 832</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">data</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2864 <a name="L833"></a><tt class="py-lineno"> 833</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-987" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
2865 lxml.etree._Element.append
2866 lxml.etree._OpaqueDocumentWrapper.append
2867 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-987', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"data-"</tt> <tt class="py-op">+</tt> <tt id="link-988" class="py-name"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-988', 'data', 'link-971');">data</a></tt><tt class="py-op">)</tt> </tt>
2868 </div><a name="L834"></a><tt class="py-lineno"> 834</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">close</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2869 <a name="L835"></a><tt class="py-lineno"> 835</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-989" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
2870 lxml.etree._Element.append
2871 lxml.etree._OpaqueDocumentWrapper.append
2872 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-989', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"close"</tt><tt class="py-op">)</tt> </tt>
2873 <a name="L836"></a><tt class="py-lineno"> 836</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">"DONE"</tt> </tt>
2874 </div></div><a name="L837"></a><tt class="py-lineno"> 837</tt> <tt class="py-line"> </tt>
2875 <a name="L838"></a><tt class="py-lineno"> 838</tt> <tt class="py-line"> <tt id="link-990" class="py-name"><a title="lxml.etree._ElementTree.parser
2876 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-990', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-991" class="py-name"><a title="lxml.etree
2877 lxml.sax.ElementTreeContentHandler.etree
2878 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2879 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2880 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-991', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-992" class="py-name"><a title="lxml.etree.XMLParser
2881 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-992', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt id="link-993" class="py-name"><a title="lxml.etree._BaseParser.target
2882 lxml.etree._ModifyContentOnlyPIProxy.target
2883 lxml.etree._ProcessingInstruction.target
2884 lxml.etree._ReadOnlyPIProxy.target" class="py-name" href="#" onclick="return doclink('link-993', 'target', 'link-622');">target</a></tt><tt class="py-op">=</tt><tt class="py-name">Target</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2885 <a name="L839"></a><tt class="py-lineno"> 839</tt> <tt class="py-line"> </tt>
2886 <a name="L840"></a><tt class="py-lineno"> 840</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
2887 <a name="L841"></a><tt class="py-lineno"> 841</tt> <tt class="py-line"> <tt class="py-name">done</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-994" class="py-name"><a title="lxml.etree
2888 lxml.sax.ElementTreeContentHandler.etree
2889 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2890 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2891 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-994', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-995" class="py-name"><a title="lxml.etree.fromstring
2892 lxml.html.fromstring
2893 lxml.html.html5parser.fromstring
2894 lxml.html.soupparser.fromstring
2895 lxml.objectify.fromstring" class="py-name" href="#" onclick="return doclink('link-995', 'fromstring', 'link-737');">fromstring</a></tt><tt class="py-op">(</tt><tt id="link-996" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-996', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root>A<a>ca</a>B</root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
2896 <a name="L842"></a><tt class="py-lineno"> 842</tt> <tt class="py-line"> <tt id="link-997" class="py-name"><a title="lxml.etree._ElementTree.parser
2897 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-997', 'parser', 'link-748');">parser</a></tt><tt class="py-op">=</tt><tt id="link-998" class="py-name"><a title="lxml.etree._ElementTree.parser
2898 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-998', 'parser', 'link-748');">parser</a></tt><tt class="py-op">)</tt> </tt>
2899 <a name="L843"></a><tt class="py-lineno"> 843</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fail</tt><tt class="py-op">(</tt><tt class="py-string">"error expected, but parsing succeeded"</tt><tt class="py-op">)</tt> </tt>
2900 <a name="L844"></a><tt class="py-lineno"> 844</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
2901 <a name="L845"></a><tt class="py-lineno"> 845</tt> <tt class="py-line"> <tt class="py-name">done</tt> <tt class="py-op">=</tt> <tt class="py-string">'value error received as expected'</tt> </tt>
2902 <a name="L846"></a><tt class="py-lineno"> 846</tt> <tt class="py-line"> </tt>
2903 <a name="L847"></a><tt class="py-lineno"> 847</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">"start-root"</tt><tt class="py-op">,</tt> <tt class="py-string">"data-A"</tt><tt class="py-op">,</tt> <tt class="py-string">"start-a"</tt><tt class="py-op">,</tt> </tt>
2904 <a name="L848"></a><tt class="py-lineno"> 848</tt> <tt class="py-line"> <tt class="py-string">"data-ca"</tt><tt class="py-op">,</tt> <tt class="py-string">"end-a"</tt><tt class="py-op">,</tt> <tt class="py-string">"close"</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
2905 <a name="L849"></a><tt class="py-lineno"> 849</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">)</tt> </tt>
2906 </div><a name="L850"></a><tt class="py-lineno"> 850</tt> <tt class="py-line"> </tt>
2907 <a name="ETreeOnlyTestCase.test_parser_target_comment"></a><div id="ETreeOnlyTestCase.test_parser_target_comment-def"><a name="L851"></a><tt class="py-lineno"> 851</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_parser_target_comment-toggle" onclick="return toggle('ETreeOnlyTestCase.test_parser_target_comment');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parser_target_comment">test_parser_target_comment</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2908 </div><div id="ETreeOnlyTestCase.test_parser_target_comment-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_parser_target_comment-expanded"><a name="L852"></a><tt class="py-lineno"> 852</tt> <tt class="py-line"> <tt class="py-name">events</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
2909 <a name="L853"></a><tt class="py-lineno"> 853</tt> <tt class="py-line"> <tt class="py-keyword">class</tt> <tt class="py-def-name">Target</tt><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2910 <a name="L854"></a><tt class="py-lineno"> 854</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">start</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tag</tt><tt class="py-op">,</tt> <tt class="py-param">attrib</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2911 <a name="L855"></a><tt class="py-lineno"> 855</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-999" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
2912 lxml.etree._Element.append
2913 lxml.etree._OpaqueDocumentWrapper.append
2914 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-999', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"start-"</tt> <tt class="py-op">+</tt> <tt id="link-1000" class="py-name"><a title="lxml.etree._Comment.tag
2915 lxml.etree._Element.tag
2916 lxml.etree._Entity.tag
2917 lxml.etree._ProcessingInstruction.tag
2918 lxml.etree._ReadOnlyProxy.tag
2919 lxml.tests.test_xpathevaluator.tag
2920 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1000', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
2921 </div><a name="L856"></a><tt class="py-lineno"> 856</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">end</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tag</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2922 <a name="L857"></a><tt class="py-lineno"> 857</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-1001" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
2923 lxml.etree._Element.append
2924 lxml.etree._OpaqueDocumentWrapper.append
2925 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1001', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"end-"</tt> <tt class="py-op">+</tt> <tt id="link-1002" class="py-name"><a title="lxml.etree._Comment.tag
2926 lxml.etree._Element.tag
2927 lxml.etree._Entity.tag
2928 lxml.etree._ProcessingInstruction.tag
2929 lxml.etree._ReadOnlyProxy.tag
2930 lxml.tests.test_xpathevaluator.tag
2931 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1002', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
2932 </div><a name="L858"></a><tt class="py-lineno"> 858</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">data</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2933 <a name="L859"></a><tt class="py-lineno"> 859</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-1003" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
2934 lxml.etree._Element.append
2935 lxml.etree._OpaqueDocumentWrapper.append
2936 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1003', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"data-"</tt> <tt class="py-op">+</tt> <tt id="link-1004" class="py-name"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-1004', 'data', 'link-971');">data</a></tt><tt class="py-op">)</tt> </tt>
2937 </div><a name="L860"></a><tt class="py-lineno"> 860</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">comment</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">text</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2938 <a name="L861"></a><tt class="py-lineno"> 861</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-1005" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
2939 lxml.etree._Element.append
2940 lxml.etree._OpaqueDocumentWrapper.append
2941 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1005', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"comment-"</tt> <tt class="py-op">+</tt> <tt id="link-1006" class="py-name"><a title="lxml.etree.QName.text
2942 lxml.etree._AppendOnlyElementProxy.text
2943 lxml.etree._Element.text
2944 lxml.etree._Entity.text
2945 lxml.etree._ModifyContentOnlyProxy.text
2946 lxml.etree._ReadOnlyEntityProxy.text
2947 lxml.etree._ReadOnlyProxy.text
2948 lxml.etree.__ContentOnlyElement.text
2949 lxml.objectify.ObjectifiedElement.text
2950 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-1006', 'text', 'link-194');">text</a></tt><tt class="py-op">)</tt> </tt>
2951 </div><a name="L862"></a><tt class="py-lineno"> 862</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">close</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2952 <a name="L863"></a><tt class="py-lineno"> 863</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">"DONE"</tt> </tt>
2953 </div></div><a name="L864"></a><tt class="py-lineno"> 864</tt> <tt class="py-line"> </tt>
2954 <a name="L865"></a><tt class="py-lineno"> 865</tt> <tt class="py-line"> <tt id="link-1007" class="py-name"><a title="lxml.etree._ElementTree.parser
2955 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1007', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1008" class="py-name"><a title="lxml.etree
2956 lxml.sax.ElementTreeContentHandler.etree
2957 lxml.tests.test_elementtree.CElementTreeTestCase.etree
2958 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
2959 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1008', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1009" class="py-name"><a title="lxml.etree.XMLParser
2960 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-1009', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt id="link-1010" class="py-name"><a title="lxml.etree._BaseParser.target
2961 lxml.etree._ModifyContentOnlyPIProxy.target
2962 lxml.etree._ProcessingInstruction.target
2963 lxml.etree._ReadOnlyPIProxy.target" class="py-name" href="#" onclick="return doclink('link-1010', 'target', 'link-622');">target</a></tt><tt class="py-op">=</tt><tt class="py-name">Target</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2964 <a name="L866"></a><tt class="py-lineno"> 866</tt> <tt class="py-line"> </tt>
2965 <a name="L867"></a><tt class="py-lineno"> 867</tt> <tt class="py-line"> <tt id="link-1011" class="py-name"><a title="lxml.etree._ElementTree.parser
2966 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1011', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-1012" class="py-name"><a title="lxml.etree._FeedParser.feed" class="py-name" href="#" onclick="return doclink('link-1012', 'feed', 'link-924');">feed</a></tt><tt class="py-op">(</tt><tt id="link-1013" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1013', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!--a--><root>A<!--b--><sub/><!--c-->B</root><!--d-->'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
2967 <a name="L868"></a><tt class="py-lineno"> 868</tt> <tt class="py-line"> <tt class="py-name">done</tt> <tt class="py-op">=</tt> <tt id="link-1014" class="py-name"><a title="lxml.etree._ElementTree.parser
2968 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1014', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-1015" class="py-name"><a title="lxml.etree.TreeBuilder.close
2969 lxml.etree._FeedParser.close" class="py-name" href="#" onclick="return doclink('link-1015', 'close', 'link-937');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
2970 <a name="L869"></a><tt class="py-lineno"> 869</tt> <tt class="py-line"> </tt>
2971 <a name="L870"></a><tt class="py-lineno"> 870</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-string">"DONE"</tt><tt class="py-op">,</tt> <tt class="py-name">done</tt><tt class="py-op">)</tt> </tt>
2972 <a name="L871"></a><tt class="py-lineno"> 871</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">"comment-a"</tt><tt class="py-op">,</tt> <tt class="py-string">"start-root"</tt><tt class="py-op">,</tt> <tt class="py-string">"data-A"</tt><tt class="py-op">,</tt> <tt class="py-string">"comment-b"</tt><tt class="py-op">,</tt> </tt>
2973 <a name="L872"></a><tt class="py-lineno"> 872</tt> <tt class="py-line"> <tt class="py-string">"start-sub"</tt><tt class="py-op">,</tt> <tt class="py-string">"end-sub"</tt><tt class="py-op">,</tt> <tt class="py-string">"comment-c"</tt><tt class="py-op">,</tt> <tt class="py-string">"data-B"</tt><tt class="py-op">,</tt> </tt>
2974 <a name="L873"></a><tt class="py-lineno"> 873</tt> <tt class="py-line"> <tt class="py-string">"end-root"</tt><tt class="py-op">,</tt> <tt class="py-string">"comment-d"</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
2975 <a name="L874"></a><tt class="py-lineno"> 874</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">)</tt> </tt>
2976 </div><a name="L875"></a><tt class="py-lineno"> 875</tt> <tt class="py-line"> </tt>
2977 <a name="ETreeOnlyTestCase.test_parser_target_pi"></a><div id="ETreeOnlyTestCase.test_parser_target_pi-def"><a name="L876"></a><tt class="py-lineno"> 876</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_parser_target_pi-toggle" onclick="return toggle('ETreeOnlyTestCase.test_parser_target_pi');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parser_target_pi">test_parser_target_pi</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2978 </div><div id="ETreeOnlyTestCase.test_parser_target_pi-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_parser_target_pi-expanded"><a name="L877"></a><tt class="py-lineno"> 877</tt> <tt class="py-line"> <tt class="py-name">events</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
2979 <a name="L878"></a><tt class="py-lineno"> 878</tt> <tt class="py-line"> <tt class="py-keyword">class</tt> <tt class="py-def-name">Target</tt><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2980 <a name="L879"></a><tt class="py-lineno"> 879</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">start</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tag</tt><tt class="py-op">,</tt> <tt class="py-param">attrib</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2981 <a name="L880"></a><tt class="py-lineno"> 880</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-1016" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
2982 lxml.etree._Element.append
2983 lxml.etree._OpaqueDocumentWrapper.append
2984 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1016', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"start-"</tt> <tt class="py-op">+</tt> <tt id="link-1017" class="py-name"><a title="lxml.etree._Comment.tag
2985 lxml.etree._Element.tag
2986 lxml.etree._Entity.tag
2987 lxml.etree._ProcessingInstruction.tag
2988 lxml.etree._ReadOnlyProxy.tag
2989 lxml.tests.test_xpathevaluator.tag
2990 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1017', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
2991 </div><a name="L881"></a><tt class="py-lineno"> 881</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">end</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tag</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
2992 <a name="L882"></a><tt class="py-lineno"> 882</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-1018" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
2993 lxml.etree._Element.append
2994 lxml.etree._OpaqueDocumentWrapper.append
2995 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1018', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"end-"</tt> <tt class="py-op">+</tt> <tt id="link-1019" class="py-name"><a title="lxml.etree._Comment.tag
2996 lxml.etree._Element.tag
2997 lxml.etree._Entity.tag
2998 lxml.etree._ProcessingInstruction.tag
2999 lxml.etree._ReadOnlyProxy.tag
3000 lxml.tests.test_xpathevaluator.tag
3001 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1019', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
3002 </div><a name="L883"></a><tt class="py-lineno"> 883</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">data</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3003 <a name="L884"></a><tt class="py-lineno"> 884</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-1020" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
3004 lxml.etree._Element.append
3005 lxml.etree._OpaqueDocumentWrapper.append
3006 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1020', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"data-"</tt> <tt class="py-op">+</tt> <tt id="link-1021" class="py-name"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-1021', 'data', 'link-971');">data</a></tt><tt class="py-op">)</tt> </tt>
3007 </div><a name="L885"></a><tt class="py-lineno"> 885</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">pi</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">target</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3008 <a name="L886"></a><tt class="py-lineno"> 886</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-1022" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
3009 lxml.etree._Element.append
3010 lxml.etree._OpaqueDocumentWrapper.append
3011 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1022', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"pi-"</tt> <tt class="py-op">+</tt> <tt id="link-1023" class="py-name"><a title="lxml.etree._BaseParser.target
3012 lxml.etree._ModifyContentOnlyPIProxy.target
3013 lxml.etree._ProcessingInstruction.target
3014 lxml.etree._ReadOnlyPIProxy.target" class="py-name" href="#" onclick="return doclink('link-1023', 'target', 'link-622');">target</a></tt> <tt class="py-op">+</tt> <tt class="py-string">"-"</tt> <tt class="py-op">+</tt> <tt id="link-1024" class="py-name"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-1024', 'data', 'link-971');">data</a></tt><tt class="py-op">)</tt> </tt>
3015 </div><a name="L887"></a><tt class="py-lineno"> 887</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">close</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3016 <a name="L888"></a><tt class="py-lineno"> 888</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">"DONE"</tt> </tt>
3017 </div></div><a name="L889"></a><tt class="py-lineno"> 889</tt> <tt class="py-line"> </tt>
3018 <a name="L890"></a><tt class="py-lineno"> 890</tt> <tt class="py-line"> <tt id="link-1025" class="py-name"><a title="lxml.etree._ElementTree.parser
3019 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1025', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1026" class="py-name"><a title="lxml.etree
3020 lxml.sax.ElementTreeContentHandler.etree
3021 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3022 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3023 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1026', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1027" class="py-name"><a title="lxml.etree.XMLParser
3024 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-1027', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt id="link-1028" class="py-name"><a title="lxml.etree._BaseParser.target
3025 lxml.etree._ModifyContentOnlyPIProxy.target
3026 lxml.etree._ProcessingInstruction.target
3027 lxml.etree._ReadOnlyPIProxy.target" class="py-name" href="#" onclick="return doclink('link-1028', 'target', 'link-622');">target</a></tt><tt class="py-op">=</tt><tt class="py-name">Target</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3028 <a name="L891"></a><tt class="py-lineno"> 891</tt> <tt class="py-line"> </tt>
3029 <a name="L892"></a><tt class="py-lineno"> 892</tt> <tt class="py-line"> <tt id="link-1029" class="py-name"><a title="lxml.etree._ElementTree.parser
3030 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1029', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-1030" class="py-name"><a title="lxml.etree._FeedParser.feed" class="py-name" href="#" onclick="return doclink('link-1030', 'feed', 'link-924');">feed</a></tt><tt class="py-op">(</tt><tt id="link-1031" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1031', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<?test a?><root>A<?test b?>B</root><?test c?>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3031 <a name="L893"></a><tt class="py-lineno"> 893</tt> <tt class="py-line"> <tt class="py-name">done</tt> <tt class="py-op">=</tt> <tt id="link-1032" class="py-name"><a title="lxml.etree._ElementTree.parser
3032 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1032', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-1033" class="py-name"><a title="lxml.etree.TreeBuilder.close
3033 lxml.etree._FeedParser.close" class="py-name" href="#" onclick="return doclink('link-1033', 'close', 'link-937');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
3034 <a name="L894"></a><tt class="py-lineno"> 894</tt> <tt class="py-line"> </tt>
3035 <a name="L895"></a><tt class="py-lineno"> 895</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-string">"DONE"</tt><tt class="py-op">,</tt> <tt class="py-name">done</tt><tt class="py-op">)</tt> </tt>
3036 <a name="L896"></a><tt class="py-lineno"> 896</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">"pi-test-a"</tt><tt class="py-op">,</tt> <tt class="py-string">"start-root"</tt><tt class="py-op">,</tt> <tt class="py-string">"data-A"</tt><tt class="py-op">,</tt> <tt class="py-string">"pi-test-b"</tt><tt class="py-op">,</tt> </tt>
3037 <a name="L897"></a><tt class="py-lineno"> 897</tt> <tt class="py-line"> <tt class="py-string">"data-B"</tt><tt class="py-op">,</tt> <tt class="py-string">"end-root"</tt><tt class="py-op">,</tt> <tt class="py-string">"pi-test-c"</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
3038 <a name="L898"></a><tt class="py-lineno"> 898</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">)</tt> </tt>
3039 </div><a name="L899"></a><tt class="py-lineno"> 899</tt> <tt class="py-line"> </tt>
3040 <a name="ETreeOnlyTestCase.test_parser_target_cdata"></a><div id="ETreeOnlyTestCase.test_parser_target_cdata-def"><a name="L900"></a><tt class="py-lineno"> 900</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_parser_target_cdata-toggle" onclick="return toggle('ETreeOnlyTestCase.test_parser_target_cdata');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parser_target_cdata">test_parser_target_cdata</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3041 </div><div id="ETreeOnlyTestCase.test_parser_target_cdata-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_parser_target_cdata-expanded"><a name="L901"></a><tt class="py-lineno"> 901</tt> <tt class="py-line"> <tt class="py-name">events</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
3042 <a name="L902"></a><tt class="py-lineno"> 902</tt> <tt class="py-line"> <tt class="py-keyword">class</tt> <tt class="py-def-name">Target</tt><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3043 <a name="L903"></a><tt class="py-lineno"> 903</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">start</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tag</tt><tt class="py-op">,</tt> <tt class="py-param">attrib</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3044 <a name="L904"></a><tt class="py-lineno"> 904</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-1034" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
3045 lxml.etree._Element.append
3046 lxml.etree._OpaqueDocumentWrapper.append
3047 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1034', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"start-"</tt> <tt class="py-op">+</tt> <tt id="link-1035" class="py-name"><a title="lxml.etree._Comment.tag
3048 lxml.etree._Element.tag
3049 lxml.etree._Entity.tag
3050 lxml.etree._ProcessingInstruction.tag
3051 lxml.etree._ReadOnlyProxy.tag
3052 lxml.tests.test_xpathevaluator.tag
3053 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1035', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
3054 </div><a name="L905"></a><tt class="py-lineno"> 905</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">end</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tag</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3055 <a name="L906"></a><tt class="py-lineno"> 906</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-1036" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
3056 lxml.etree._Element.append
3057 lxml.etree._OpaqueDocumentWrapper.append
3058 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1036', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"end-"</tt> <tt class="py-op">+</tt> <tt id="link-1037" class="py-name"><a title="lxml.etree._Comment.tag
3059 lxml.etree._Element.tag
3060 lxml.etree._Entity.tag
3061 lxml.etree._ProcessingInstruction.tag
3062 lxml.etree._ReadOnlyProxy.tag
3063 lxml.tests.test_xpathevaluator.tag
3064 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1037', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
3065 </div><a name="L907"></a><tt class="py-lineno"> 907</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">data</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3066 <a name="L908"></a><tt class="py-lineno"> 908</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-1038" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
3067 lxml.etree._Element.append
3068 lxml.etree._OpaqueDocumentWrapper.append
3069 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1038', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"data-"</tt> <tt class="py-op">+</tt> <tt id="link-1039" class="py-name"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-1039', 'data', 'link-971');">data</a></tt><tt class="py-op">)</tt> </tt>
3070 </div><a name="L909"></a><tt class="py-lineno"> 909</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">close</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3071 <a name="L910"></a><tt class="py-lineno"> 910</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">"DONE"</tt> </tt>
3072 </div></div><a name="L911"></a><tt class="py-lineno"> 911</tt> <tt class="py-line"> </tt>
3073 <a name="L912"></a><tt class="py-lineno"> 912</tt> <tt class="py-line"> <tt id="link-1040" class="py-name"><a title="lxml.etree._ElementTree.parser
3074 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1040', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1041" class="py-name"><a title="lxml.etree
3075 lxml.sax.ElementTreeContentHandler.etree
3076 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3077 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3078 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1041', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1042" class="py-name"><a title="lxml.etree.XMLParser
3079 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-1042', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt id="link-1043" class="py-name"><a title="lxml.etree._BaseParser.target
3080 lxml.etree._ModifyContentOnlyPIProxy.target
3081 lxml.etree._ProcessingInstruction.target
3082 lxml.etree._ReadOnlyPIProxy.target" class="py-name" href="#" onclick="return doclink('link-1043', 'target', 'link-622');">target</a></tt><tt class="py-op">=</tt><tt class="py-name">Target</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
3083 <a name="L913"></a><tt class="py-lineno"> 913</tt> <tt class="py-line"> <tt class="py-name">strip_cdata</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
3084 <a name="L914"></a><tt class="py-lineno"> 914</tt> <tt class="py-line"> </tt>
3085 <a name="L915"></a><tt class="py-lineno"> 915</tt> <tt class="py-line"> <tt id="link-1044" class="py-name"><a title="lxml.etree._ElementTree.parser
3086 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1044', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-1045" class="py-name"><a title="lxml.etree._FeedParser.feed" class="py-name" href="#" onclick="return doclink('link-1045', 'feed', 'link-924');">feed</a></tt><tt class="py-op">(</tt><tt id="link-1046" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1046', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root>A<a><![CDATA[ca]]></a>B</root>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3087 <a name="L916"></a><tt class="py-lineno"> 916</tt> <tt class="py-line"> <tt class="py-name">done</tt> <tt class="py-op">=</tt> <tt id="link-1047" class="py-name"><a title="lxml.etree._ElementTree.parser
3088 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1047', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-1048" class="py-name"><a title="lxml.etree.TreeBuilder.close
3089 lxml.etree._FeedParser.close" class="py-name" href="#" onclick="return doclink('link-1048', 'close', 'link-937');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
3090 <a name="L917"></a><tt class="py-lineno"> 917</tt> <tt class="py-line"> </tt>
3091 <a name="L918"></a><tt class="py-lineno"> 918</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-string">"DONE"</tt><tt class="py-op">,</tt> <tt class="py-name">done</tt><tt class="py-op">)</tt> </tt>
3092 <a name="L919"></a><tt class="py-lineno"> 919</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">"start-root"</tt><tt class="py-op">,</tt> <tt class="py-string">"data-A"</tt><tt class="py-op">,</tt> <tt class="py-string">"start-a"</tt><tt class="py-op">,</tt> </tt>
3093 <a name="L920"></a><tt class="py-lineno"> 920</tt> <tt class="py-line"> <tt class="py-string">"data-ca"</tt><tt class="py-op">,</tt> <tt class="py-string">"end-a"</tt><tt class="py-op">,</tt> <tt class="py-string">"data-B"</tt><tt class="py-op">,</tt> <tt class="py-string">"end-root"</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
3094 <a name="L921"></a><tt class="py-lineno"> 921</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">)</tt> </tt>
3095 </div><a name="L922"></a><tt class="py-lineno"> 922</tt> <tt class="py-line"> </tt>
3096 <a name="ETreeOnlyTestCase.test_parser_target_recover"></a><div id="ETreeOnlyTestCase.test_parser_target_recover-def"><a name="L923"></a><tt class="py-lineno"> 923</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_parser_target_recover-toggle" onclick="return toggle('ETreeOnlyTestCase.test_parser_target_recover');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parser_target_recover">test_parser_target_recover</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3097 </div><div id="ETreeOnlyTestCase.test_parser_target_recover-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_parser_target_recover-expanded"><a name="L924"></a><tt class="py-lineno"> 924</tt> <tt class="py-line"> <tt class="py-name">events</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
3098 <a name="L925"></a><tt class="py-lineno"> 925</tt> <tt class="py-line"> <tt class="py-keyword">class</tt> <tt class="py-def-name">Target</tt><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3099 <a name="L926"></a><tt class="py-lineno"> 926</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">start</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tag</tt><tt class="py-op">,</tt> <tt class="py-param">attrib</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3100 <a name="L927"></a><tt class="py-lineno"> 927</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-1049" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
3101 lxml.etree._Element.append
3102 lxml.etree._OpaqueDocumentWrapper.append
3103 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1049', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"start-"</tt> <tt class="py-op">+</tt> <tt id="link-1050" class="py-name"><a title="lxml.etree._Comment.tag
3104 lxml.etree._Element.tag
3105 lxml.etree._Entity.tag
3106 lxml.etree._ProcessingInstruction.tag
3107 lxml.etree._ReadOnlyProxy.tag
3108 lxml.tests.test_xpathevaluator.tag
3109 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1050', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
3110 </div><a name="L928"></a><tt class="py-lineno"> 928</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">end</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tag</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3111 <a name="L929"></a><tt class="py-lineno"> 929</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-1051" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
3112 lxml.etree._Element.append
3113 lxml.etree._OpaqueDocumentWrapper.append
3114 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1051', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"end-"</tt> <tt class="py-op">+</tt> <tt id="link-1052" class="py-name"><a title="lxml.etree._Comment.tag
3115 lxml.etree._Element.tag
3116 lxml.etree._Entity.tag
3117 lxml.etree._ProcessingInstruction.tag
3118 lxml.etree._ReadOnlyProxy.tag
3119 lxml.tests.test_xpathevaluator.tag
3120 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1052', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
3121 </div><a name="L930"></a><tt class="py-lineno"> 930</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">data</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3122 <a name="L931"></a><tt class="py-lineno"> 931</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-1053" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
3123 lxml.etree._Element.append
3124 lxml.etree._OpaqueDocumentWrapper.append
3125 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1053', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"data-"</tt> <tt class="py-op">+</tt> <tt id="link-1054" class="py-name"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-1054', 'data', 'link-971');">data</a></tt><tt class="py-op">)</tt> </tt>
3126 </div><a name="L932"></a><tt class="py-lineno"> 932</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">close</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3127 <a name="L933"></a><tt class="py-lineno"> 933</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-1055" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
3128 lxml.etree._Element.append
3129 lxml.etree._OpaqueDocumentWrapper.append
3130 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1055', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-string">"close"</tt><tt class="py-op">)</tt> </tt>
3131 <a name="L934"></a><tt class="py-lineno"> 934</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">"DONE"</tt> </tt>
3132 </div></div><a name="L935"></a><tt class="py-lineno"> 935</tt> <tt class="py-line"> </tt>
3133 <a name="L936"></a><tt class="py-lineno"> 936</tt> <tt class="py-line"> <tt id="link-1056" class="py-name"><a title="lxml.etree._ElementTree.parser
3134 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1056', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1057" class="py-name"><a title="lxml.etree
3135 lxml.sax.ElementTreeContentHandler.etree
3136 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3137 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3138 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1057', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1058" class="py-name"><a title="lxml.etree.XMLParser
3139 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-1058', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt id="link-1059" class="py-name"><a title="lxml.etree._BaseParser.target
3140 lxml.etree._ModifyContentOnlyPIProxy.target
3141 lxml.etree._ProcessingInstruction.target
3142 lxml.etree._ReadOnlyPIProxy.target" class="py-name" href="#" onclick="return doclink('link-1059', 'target', 'link-622');">target</a></tt><tt class="py-op">=</tt><tt class="py-name">Target</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
3143 <a name="L937"></a><tt class="py-lineno"> 937</tt> <tt class="py-line"> <tt class="py-name">recover</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
3144 <a name="L938"></a><tt class="py-lineno"> 938</tt> <tt class="py-line"> </tt>
3145 <a name="L939"></a><tt class="py-lineno"> 939</tt> <tt class="py-line"> <tt id="link-1060" class="py-name"><a title="lxml.etree._ElementTree.parser
3146 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1060', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-1061" class="py-name"><a title="lxml.etree._FeedParser.feed" class="py-name" href="#" onclick="return doclink('link-1061', 'feed', 'link-924');">feed</a></tt><tt class="py-op">(</tt><tt id="link-1062" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1062', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root>A<a>ca</a>B</not-root>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3147 <a name="L940"></a><tt class="py-lineno"> 940</tt> <tt class="py-line"> <tt class="py-name">done</tt> <tt class="py-op">=</tt> <tt id="link-1063" class="py-name"><a title="lxml.etree._ElementTree.parser
3148 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1063', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-1064" class="py-name"><a title="lxml.etree.TreeBuilder.close
3149 lxml.etree._FeedParser.close" class="py-name" href="#" onclick="return doclink('link-1064', 'close', 'link-937');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
3150 <a name="L941"></a><tt class="py-lineno"> 941</tt> <tt class="py-line"> </tt>
3151 <a name="L942"></a><tt class="py-lineno"> 942</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-string">"DONE"</tt><tt class="py-op">,</tt> <tt class="py-name">done</tt><tt class="py-op">)</tt> </tt>
3152 <a name="L943"></a><tt class="py-lineno"> 943</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">"start-root"</tt><tt class="py-op">,</tt> <tt class="py-string">"data-A"</tt><tt class="py-op">,</tt> <tt class="py-string">"start-a"</tt><tt class="py-op">,</tt> </tt>
3153 <a name="L944"></a><tt class="py-lineno"> 944</tt> <tt class="py-line"> <tt class="py-string">"data-ca"</tt><tt class="py-op">,</tt> <tt class="py-string">"end-a"</tt><tt class="py-op">,</tt> <tt class="py-string">"data-B"</tt><tt class="py-op">,</tt> </tt>
3154 <a name="L945"></a><tt class="py-lineno"> 945</tt> <tt class="py-line"> <tt class="py-string">"end-root"</tt><tt class="py-op">,</tt> <tt class="py-string">"close"</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
3155 <a name="L946"></a><tt class="py-lineno"> 946</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">)</tt> </tt>
3156 </div><a name="L947"></a><tt class="py-lineno"> 947</tt> <tt class="py-line"> </tt>
3157 <a name="ETreeOnlyTestCase.test_iterwalk_tag"></a><div id="ETreeOnlyTestCase.test_iterwalk_tag-def"><a name="L948"></a><tt class="py-lineno"> 948</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterwalk_tag-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterwalk_tag');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterwalk_tag">test_iterwalk_tag</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3158 </div><div id="ETreeOnlyTestCase.test_iterwalk_tag-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterwalk_tag-expanded"><a name="L949"></a><tt class="py-lineno"> 949</tt> <tt class="py-line"> <tt id="link-1065" class="py-name" targets="Class lxml.etree.iterwalk=lxml.etree.iterwalk-class.html"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1065', 'iterwalk', 'link-1065');">iterwalk</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1066" class="py-name"><a title="lxml.etree
3159 lxml.sax.ElementTreeContentHandler.etree
3160 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3161 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3162 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1066', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1067" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1067', 'iterwalk', 'link-1065');">iterwalk</a></tt> </tt>
3163 <a name="L950"></a><tt class="py-lineno"> 950</tt> <tt class="py-line"> <tt id="link-1068" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1068', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1069" class="py-name"><a title="lxml.etree
3164 lxml.sax.ElementTreeContentHandler.etree
3165 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3166 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3167 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1069', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1070" class="py-name"><a title="lxml.etree.XML
3169 lxml.tests.test_objectify.ObjectifyTestCase.XML
3170 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1070', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-1071" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1071', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b><d/></b><c/></a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3171 <a name="L951"></a><tt class="py-lineno"> 951</tt> <tt class="py-line"> </tt>
3172 <a name="L952"></a><tt class="py-lineno"> 952</tt> <tt class="py-line"> <tt class="py-name">iterator</tt> <tt class="py-op">=</tt> <tt id="link-1072" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1072', 'iterwalk', 'link-1065');">iterwalk</a></tt><tt class="py-op">(</tt><tt id="link-1073" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1073', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt id="link-1074" class="py-name"><a title="lxml.etree._Comment.tag
3173 lxml.etree._Element.tag
3174 lxml.etree._Entity.tag
3175 lxml.etree._ProcessingInstruction.tag
3176 lxml.etree._ReadOnlyProxy.tag
3177 lxml.tests.test_xpathevaluator.tag
3178 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1074', 'tag', 'link-73');">tag</a></tt><tt class="py-op">=</tt><tt class="py-string">"b"</tt><tt class="py-op">,</tt> <tt class="py-name">events</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-string">'start'</tt><tt class="py-op">,</tt> <tt class="py-string">'end'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3179 <a name="L953"></a><tt class="py-lineno"> 953</tt> <tt class="py-line"> <tt class="py-name">events</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">iterator</tt><tt class="py-op">)</tt> </tt>
3180 <a name="L954"></a><tt class="py-lineno"> 954</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
3181 <a name="L955"></a><tt class="py-lineno"> 955</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt class="py-string">'start'</tt><tt class="py-op">,</tt> <tt id="link-1075" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1075', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-string">'end'</tt><tt class="py-op">,</tt> <tt id="link-1076" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1076', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
3182 <a name="L956"></a><tt class="py-lineno"> 956</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">)</tt> </tt>
3183 </div><a name="L957"></a><tt class="py-lineno"> 957</tt> <tt class="py-line"> </tt>
3184 <a name="ETreeOnlyTestCase.test_iterwalk_tag_all"></a><div id="ETreeOnlyTestCase.test_iterwalk_tag_all-def"><a name="L958"></a><tt class="py-lineno"> 958</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterwalk_tag_all-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterwalk_tag_all');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterwalk_tag_all">test_iterwalk_tag_all</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3185 </div><div id="ETreeOnlyTestCase.test_iterwalk_tag_all-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterwalk_tag_all-expanded"><a name="L959"></a><tt class="py-lineno"> 959</tt> <tt class="py-line"> <tt id="link-1077" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1077', 'iterwalk', 'link-1065');">iterwalk</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1078" class="py-name"><a title="lxml.etree
3186 lxml.sax.ElementTreeContentHandler.etree
3187 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3188 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3189 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1078', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1079" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1079', 'iterwalk', 'link-1065');">iterwalk</a></tt> </tt>
3190 <a name="L960"></a><tt class="py-lineno"> 960</tt> <tt class="py-line"> <tt id="link-1080" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1080', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1081" class="py-name"><a title="lxml.etree
3191 lxml.sax.ElementTreeContentHandler.etree
3192 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3193 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3194 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1081', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1082" class="py-name"><a title="lxml.etree.XML
3196 lxml.tests.test_objectify.ObjectifyTestCase.XML
3197 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1082', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-1083" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1083', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b><d/></b><c/></a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3198 <a name="L961"></a><tt class="py-lineno"> 961</tt> <tt class="py-line"> </tt>
3199 <a name="L962"></a><tt class="py-lineno"> 962</tt> <tt class="py-line"> <tt class="py-name">iterator</tt> <tt class="py-op">=</tt> <tt id="link-1084" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1084', 'iterwalk', 'link-1065');">iterwalk</a></tt><tt class="py-op">(</tt><tt id="link-1085" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1085', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt id="link-1086" class="py-name"><a title="lxml.etree._Comment.tag
3200 lxml.etree._Element.tag
3201 lxml.etree._Entity.tag
3202 lxml.etree._ProcessingInstruction.tag
3203 lxml.etree._ReadOnlyProxy.tag
3204 lxml.tests.test_xpathevaluator.tag
3205 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1086', 'tag', 'link-73');">tag</a></tt><tt class="py-op">=</tt><tt class="py-string">"*"</tt><tt class="py-op">,</tt> <tt class="py-name">events</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-string">'start'</tt><tt class="py-op">,</tt> <tt class="py-string">'end'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3206 <a name="L963"></a><tt class="py-lineno"> 963</tt> <tt class="py-line"> <tt class="py-name">events</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">iterator</tt><tt class="py-op">)</tt> </tt>
3207 <a name="L964"></a><tt class="py-lineno"> 964</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
3208 <a name="L965"></a><tt class="py-lineno"> 965</tt> <tt class="py-line"> <tt class="py-number">8</tt><tt class="py-op">,</tt> </tt>
3209 <a name="L966"></a><tt class="py-lineno"> 966</tt> <tt class="py-line"> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">events</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3210 </div><a name="L967"></a><tt class="py-lineno"> 967</tt> <tt class="py-line"> </tt>
3211 <a name="ETreeOnlyTestCase.test_iterwalk"></a><div id="ETreeOnlyTestCase.test_iterwalk-def"><a name="L968"></a><tt class="py-lineno"> 968</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterwalk-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterwalk');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterwalk">test_iterwalk</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3212 </div><div id="ETreeOnlyTestCase.test_iterwalk-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterwalk-expanded"><a name="L969"></a><tt class="py-lineno"> 969</tt> <tt class="py-line"> <tt id="link-1087" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1087', 'iterwalk', 'link-1065');">iterwalk</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1088" class="py-name"><a title="lxml.etree
3213 lxml.sax.ElementTreeContentHandler.etree
3214 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3215 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3216 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1088', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1089" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1089', 'iterwalk', 'link-1065');">iterwalk</a></tt> </tt>
3217 <a name="L970"></a><tt class="py-lineno"> 970</tt> <tt class="py-line"> <tt id="link-1090" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1090', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1091" class="py-name"><a title="lxml.etree
3218 lxml.sax.ElementTreeContentHandler.etree
3219 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3220 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3221 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1091', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1092" class="py-name"><a title="lxml.etree.XML
3223 lxml.tests.test_objectify.ObjectifyTestCase.XML
3224 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1092', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-1093" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1093', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b></b><c/></a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3225 <a name="L971"></a><tt class="py-lineno"> 971</tt> <tt class="py-line"> </tt>
3226 <a name="L972"></a><tt class="py-lineno"> 972</tt> <tt class="py-line"> <tt class="py-name">events</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt id="link-1094" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1094', 'iterwalk', 'link-1065');">iterwalk</a></tt><tt class="py-op">(</tt><tt id="link-1095" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1095', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3227 <a name="L973"></a><tt class="py-lineno"> 973</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
3228 <a name="L974"></a><tt class="py-lineno"> 974</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt class="py-string">'end'</tt><tt class="py-op">,</tt> <tt id="link-1096" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1096', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-string">'end'</tt><tt class="py-op">,</tt> <tt id="link-1097" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1097', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-string">'end'</tt><tt class="py-op">,</tt> <tt id="link-1098" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1098', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
3229 <a name="L975"></a><tt class="py-lineno"> 975</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">)</tt> </tt>
3230 </div><a name="L976"></a><tt class="py-lineno"> 976</tt> <tt class="py-line"> </tt>
3231 <a name="ETreeOnlyTestCase.test_iterwalk_start"></a><div id="ETreeOnlyTestCase.test_iterwalk_start-def"><a name="L977"></a><tt class="py-lineno"> 977</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterwalk_start-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterwalk_start');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterwalk_start">test_iterwalk_start</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3232 </div><div id="ETreeOnlyTestCase.test_iterwalk_start-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterwalk_start-expanded"><a name="L978"></a><tt class="py-lineno"> 978</tt> <tt class="py-line"> <tt id="link-1099" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1099', 'iterwalk', 'link-1065');">iterwalk</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1100" class="py-name"><a title="lxml.etree
3233 lxml.sax.ElementTreeContentHandler.etree
3234 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3235 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3236 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1100', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1101" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1101', 'iterwalk', 'link-1065');">iterwalk</a></tt> </tt>
3237 <a name="L979"></a><tt class="py-lineno"> 979</tt> <tt class="py-line"> <tt id="link-1102" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1102', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1103" class="py-name"><a title="lxml.etree
3238 lxml.sax.ElementTreeContentHandler.etree
3239 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3240 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3241 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1103', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1104" class="py-name"><a title="lxml.etree.XML
3243 lxml.tests.test_objectify.ObjectifyTestCase.XML
3244 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1104', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-1105" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1105', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b></b><c/></a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3245 <a name="L980"></a><tt class="py-lineno"> 980</tt> <tt class="py-line"> </tt>
3246 <a name="L981"></a><tt class="py-lineno"> 981</tt> <tt class="py-line"> <tt class="py-name">iterator</tt> <tt class="py-op">=</tt> <tt id="link-1106" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1106', 'iterwalk', 'link-1065');">iterwalk</a></tt><tt class="py-op">(</tt><tt id="link-1107" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1107', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-name">events</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-string">'start'</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3247 <a name="L982"></a><tt class="py-lineno"> 982</tt> <tt class="py-line"> <tt class="py-name">events</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">iterator</tt><tt class="py-op">)</tt> </tt>
3248 <a name="L983"></a><tt class="py-lineno"> 983</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
3249 <a name="L984"></a><tt class="py-lineno"> 984</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt class="py-string">'start'</tt><tt class="py-op">,</tt> <tt id="link-1108" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1108', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-string">'start'</tt><tt class="py-op">,</tt> <tt id="link-1109" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1109', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-string">'start'</tt><tt class="py-op">,</tt> <tt id="link-1110" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1110', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
3250 <a name="L985"></a><tt class="py-lineno"> 985</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">)</tt> </tt>
3251 </div><a name="L986"></a><tt class="py-lineno"> 986</tt> <tt class="py-line"> </tt>
3252 <a name="ETreeOnlyTestCase.test_iterwalk_start_end"></a><div id="ETreeOnlyTestCase.test_iterwalk_start_end-def"><a name="L987"></a><tt class="py-lineno"> 987</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterwalk_start_end-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterwalk_start_end');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterwalk_start_end">test_iterwalk_start_end</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3253 </div><div id="ETreeOnlyTestCase.test_iterwalk_start_end-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterwalk_start_end-expanded"><a name="L988"></a><tt class="py-lineno"> 988</tt> <tt class="py-line"> <tt id="link-1111" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1111', 'iterwalk', 'link-1065');">iterwalk</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1112" class="py-name"><a title="lxml.etree
3254 lxml.sax.ElementTreeContentHandler.etree
3255 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3256 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3257 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1112', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1113" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1113', 'iterwalk', 'link-1065');">iterwalk</a></tt> </tt>
3258 <a name="L989"></a><tt class="py-lineno"> 989</tt> <tt class="py-line"> <tt id="link-1114" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1114', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1115" class="py-name"><a title="lxml.etree
3259 lxml.sax.ElementTreeContentHandler.etree
3260 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3261 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3262 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1115', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1116" class="py-name"><a title="lxml.etree.XML
3264 lxml.tests.test_objectify.ObjectifyTestCase.XML
3265 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1116', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-1117" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1117', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b></b><c/></a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3266 <a name="L990"></a><tt class="py-lineno"> 990</tt> <tt class="py-line"> </tt>
3267 <a name="L991"></a><tt class="py-lineno"> 991</tt> <tt class="py-line"> <tt class="py-name">iterator</tt> <tt class="py-op">=</tt> <tt id="link-1118" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1118', 'iterwalk', 'link-1065');">iterwalk</a></tt><tt class="py-op">(</tt><tt id="link-1119" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1119', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-name">events</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-string">'start'</tt><tt class="py-op">,</tt><tt class="py-string">'end'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3268 <a name="L992"></a><tt class="py-lineno"> 992</tt> <tt class="py-line"> <tt class="py-name">events</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">iterator</tt><tt class="py-op">)</tt> </tt>
3269 <a name="L993"></a><tt class="py-lineno"> 993</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
3270 <a name="L994"></a><tt class="py-lineno"> 994</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt class="py-string">'start'</tt><tt class="py-op">,</tt> <tt id="link-1120" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1120', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-string">'start'</tt><tt class="py-op">,</tt> <tt id="link-1121" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1121', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-string">'end'</tt><tt class="py-op">,</tt> <tt id="link-1122" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1122', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
3271 <a name="L995"></a><tt class="py-lineno"> 995</tt> <tt class="py-line"> <tt class="py-op">(</tt><tt class="py-string">'start'</tt><tt class="py-op">,</tt> <tt id="link-1123" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1123', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-string">'end'</tt><tt class="py-op">,</tt> <tt id="link-1124" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1124', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-string">'end'</tt><tt class="py-op">,</tt> <tt id="link-1125" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1125', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
3272 <a name="L996"></a><tt class="py-lineno"> 996</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">)</tt> </tt>
3273 </div><a name="L997"></a><tt class="py-lineno"> 997</tt> <tt class="py-line"> </tt>
3274 <a name="ETreeOnlyTestCase.test_iterwalk_clear"></a><div id="ETreeOnlyTestCase.test_iterwalk_clear-def"><a name="L998"></a><tt class="py-lineno"> 998</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterwalk_clear-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterwalk_clear');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterwalk_clear">test_iterwalk_clear</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3275 </div><div id="ETreeOnlyTestCase.test_iterwalk_clear-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterwalk_clear-expanded"><a name="L999"></a><tt class="py-lineno"> 999</tt> <tt class="py-line"> <tt id="link-1126" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1126', 'iterwalk', 'link-1065');">iterwalk</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1127" class="py-name"><a title="lxml.etree
3276 lxml.sax.ElementTreeContentHandler.etree
3277 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3278 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3279 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1127', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1128" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1128', 'iterwalk', 'link-1065');">iterwalk</a></tt> </tt>
3280 <a name="L1000"></a><tt class="py-lineno">1000</tt> <tt class="py-line"> <tt id="link-1129" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1129', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1130" class="py-name"><a title="lxml.etree
3281 lxml.sax.ElementTreeContentHandler.etree
3282 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3283 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3284 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1130', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1131" class="py-name"><a title="lxml.etree.XML
3286 lxml.tests.test_objectify.ObjectifyTestCase.XML
3287 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1131', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-1132" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1132', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b></b><c/></a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3288 <a name="L1001"></a><tt class="py-lineno">1001</tt> <tt class="py-line"> </tt>
3289 <a name="L1002"></a><tt class="py-lineno">1002</tt> <tt class="py-line"> <tt class="py-name">iterator</tt> <tt class="py-op">=</tt> <tt id="link-1133" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1133', 'iterwalk', 'link-1065');">iterwalk</a></tt><tt class="py-op">(</tt><tt id="link-1134" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1134', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt> </tt>
3290 <a name="L1003"></a><tt class="py-lineno">1003</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">event</tt><tt class="py-op">,</tt> <tt class="py-name">elem</tt> <tt class="py-keyword">in</tt> <tt class="py-name">iterator</tt><tt class="py-op">:</tt> </tt>
3291 <a name="L1004"></a><tt class="py-lineno">1004</tt> <tt class="py-line"> <tt class="py-name">elem</tt><tt class="py-op">.</tt><tt id="link-1135" class="py-name" targets="Method lxml.etree._Attrib.clear()=lxml.etree._Attrib-class.html#clear,Method lxml.etree._Element.clear()=lxml.etree._Element-class.html#clear,Method lxml.etree._ErrorLog.clear()=lxml.etree._ErrorLog-class.html#clear,Method lxml.etree._NamespaceRegistry.clear()=lxml.etree._NamespaceRegistry-class.html#clear"><a title="lxml.etree._Attrib.clear
3292 lxml.etree._Element.clear
3293 lxml.etree._ErrorLog.clear
3294 lxml.etree._NamespaceRegistry.clear" class="py-name" href="#" onclick="return doclink('link-1135', 'clear', 'link-1135');">clear</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
3295 <a name="L1005"></a><tt class="py-lineno">1005</tt> <tt class="py-line"> </tt>
3296 <a name="L1006"></a><tt class="py-lineno">1006</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> </tt>
3297 <a name="L1007"></a><tt class="py-lineno">1007</tt> <tt class="py-line"> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt id="link-1136" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1136', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3298 </div><a name="L1008"></a><tt class="py-lineno">1008</tt> <tt class="py-line"> </tt>
3299 <a name="ETreeOnlyTestCase.test_iterwalk_attrib_ns"></a><div id="ETreeOnlyTestCase.test_iterwalk_attrib_ns-def"><a name="L1009"></a><tt class="py-lineno">1009</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterwalk_attrib_ns-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterwalk_attrib_ns');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterwalk_attrib_ns">test_iterwalk_attrib_ns</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3300 </div><div id="ETreeOnlyTestCase.test_iterwalk_attrib_ns-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterwalk_attrib_ns-expanded"><a name="L1010"></a><tt class="py-lineno">1010</tt> <tt class="py-line"> <tt id="link-1137" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1137', 'iterwalk', 'link-1065');">iterwalk</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1138" class="py-name"><a title="lxml.etree
3301 lxml.sax.ElementTreeContentHandler.etree
3302 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3303 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3304 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1138', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1139" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1139', 'iterwalk', 'link-1065');">iterwalk</a></tt> </tt>
3305 <a name="L1011"></a><tt class="py-lineno">1011</tt> <tt class="py-line"> <tt id="link-1140" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1140', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1141" class="py-name"><a title="lxml.etree
3306 lxml.sax.ElementTreeContentHandler.etree
3307 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3308 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3309 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1141', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1142" class="py-name"><a title="lxml.etree.XML
3311 lxml.tests.test_objectify.ObjectifyTestCase.XML
3312 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1142', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-1143" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1143', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a xmlns="ns1"><b><c xmlns="ns2"/></b></a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3313 <a name="L1012"></a><tt class="py-lineno">1012</tt> <tt class="py-line"> </tt>
3314 <a name="L1013"></a><tt class="py-lineno">1013</tt> <tt class="py-line"> <tt class="py-name">attr_name</tt> <tt class="py-op">=</tt> <tt class="py-string">'{testns}bla'</tt> </tt>
3315 <a name="L1014"></a><tt class="py-lineno">1014</tt> <tt class="py-line"> <tt class="py-name">events</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
3316 <a name="L1015"></a><tt class="py-lineno">1015</tt> <tt class="py-line"> <tt class="py-name">iterator</tt> <tt class="py-op">=</tt> <tt id="link-1144" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1144', 'iterwalk', 'link-1065');">iterwalk</a></tt><tt class="py-op">(</tt><tt id="link-1145" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1145', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-name">events</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-string">'start'</tt><tt class="py-op">,</tt><tt class="py-string">'end'</tt><tt class="py-op">,</tt><tt class="py-string">'start-ns'</tt><tt class="py-op">,</tt><tt class="py-string">'end-ns'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3317 <a name="L1016"></a><tt class="py-lineno">1016</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">event</tt><tt class="py-op">,</tt> <tt class="py-name">elem</tt> <tt class="py-keyword">in</tt> <tt class="py-name">iterator</tt><tt class="py-op">:</tt> </tt>
3318 <a name="L1017"></a><tt class="py-lineno">1017</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">.</tt><tt id="link-1146" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
3319 lxml.etree._Element.append
3320 lxml.etree._OpaqueDocumentWrapper.append
3321 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1146', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">event</tt><tt class="py-op">)</tt> </tt>
3322 <a name="L1018"></a><tt class="py-lineno">1018</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">event</tt> <tt class="py-op">==</tt> <tt class="py-string">'start'</tt><tt class="py-op">:</tt> </tt>
3323 <a name="L1019"></a><tt class="py-lineno">1019</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">elem</tt><tt class="py-op">.</tt><tt id="link-1147" class="py-name"><a title="lxml.etree._Comment.tag
3324 lxml.etree._Element.tag
3325 lxml.etree._Entity.tag
3326 lxml.etree._ProcessingInstruction.tag
3327 lxml.etree._ReadOnlyProxy.tag
3328 lxml.tests.test_xpathevaluator.tag
3329 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1147', 'tag', 'link-73');">tag</a></tt> <tt class="py-op">!=</tt> <tt class="py-string">'{ns1}a'</tt><tt class="py-op">:</tt> </tt>
3330 <a name="L1020"></a><tt class="py-lineno">1020</tt> <tt class="py-line"> <tt class="py-name">elem</tt><tt class="py-op">.</tt><tt id="link-1148" class="py-name"><a title="lxml.etree._Element.set
3331 lxml.etree._XSLTProcessingInstruction.set
3332 lxml.etree.__ContentOnlyElement.set" class="py-name" href="#" onclick="return doclink('link-1148', 'set', 'link-241');">set</a></tt><tt class="py-op">(</tt><tt class="py-name">attr_name</tt><tt class="py-op">,</tt> <tt class="py-string">'value'</tt><tt class="py-op">)</tt> </tt>
3333 <a name="L1021"></a><tt class="py-lineno">1021</tt> <tt class="py-line"> </tt>
3334 <a name="L1022"></a><tt class="py-lineno">1022</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
3335 <a name="L1023"></a><tt class="py-lineno">1023</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-string">'start-ns'</tt><tt class="py-op">,</tt> <tt class="py-string">'start'</tt><tt class="py-op">,</tt> <tt class="py-string">'start'</tt><tt class="py-op">,</tt> <tt class="py-string">'start-ns'</tt><tt class="py-op">,</tt> <tt class="py-string">'start'</tt><tt class="py-op">,</tt> </tt>
3336 <a name="L1024"></a><tt class="py-lineno">1024</tt> <tt class="py-line"> <tt class="py-string">'end'</tt><tt class="py-op">,</tt> <tt class="py-string">'end-ns'</tt><tt class="py-op">,</tt> <tt class="py-string">'end'</tt><tt class="py-op">,</tt> <tt class="py-string">'end'</tt><tt class="py-op">,</tt> <tt class="py-string">'end-ns'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
3337 <a name="L1025"></a><tt class="py-lineno">1025</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">)</tt> </tt>
3338 <a name="L1026"></a><tt class="py-lineno">1026</tt> <tt class="py-line"> </tt>
3339 <a name="L1027"></a><tt class="py-lineno">1027</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
3340 <a name="L1028"></a><tt class="py-lineno">1028</tt> <tt class="py-line"> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
3341 <a name="L1029"></a><tt class="py-lineno">1029</tt> <tt class="py-line"> <tt id="link-1149" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1149', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1150" class="py-name"><a title="lxml.etree._Attrib.get
3342 lxml.etree._Element.get
3343 lxml.etree._IDDict.get
3344 lxml.etree._ProcessingInstruction.get
3345 lxml.etree._ReadOnlyElementProxy.get
3346 lxml.etree.__ContentOnlyElement.get" class="py-name" href="#" onclick="return doclink('link-1150', 'get', 'link-243');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">attr_name</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3347 <a name="L1030"></a><tt class="py-lineno">1030</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
3348 <a name="L1031"></a><tt class="py-lineno">1031</tt> <tt class="py-line"> <tt class="py-string">'value'</tt><tt class="py-op">,</tt> </tt>
3349 <a name="L1032"></a><tt class="py-lineno">1032</tt> <tt class="py-line"> <tt id="link-1151" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1151', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1152" class="py-name"><a title="lxml.etree._Attrib.get
3350 lxml.etree._Element.get
3351 lxml.etree._IDDict.get
3352 lxml.etree._ProcessingInstruction.get
3353 lxml.etree._ReadOnlyElementProxy.get
3354 lxml.etree.__ContentOnlyElement.get" class="py-name" href="#" onclick="return doclink('link-1152', 'get', 'link-243');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">attr_name</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3355 </div><a name="L1033"></a><tt class="py-lineno">1033</tt> <tt class="py-line"> </tt>
3356 <a name="ETreeOnlyTestCase.test_iterwalk_getiterator"></a><div id="ETreeOnlyTestCase.test_iterwalk_getiterator-def"><a name="L1034"></a><tt class="py-lineno">1034</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterwalk_getiterator-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterwalk_getiterator');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterwalk_getiterator">test_iterwalk_getiterator</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3357 </div><div id="ETreeOnlyTestCase.test_iterwalk_getiterator-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterwalk_getiterator-expanded"><a name="L1035"></a><tt class="py-lineno">1035</tt> <tt class="py-line"> <tt id="link-1153" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1153', 'iterwalk', 'link-1065');">iterwalk</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1154" class="py-name"><a title="lxml.etree
3358 lxml.sax.ElementTreeContentHandler.etree
3359 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3360 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3361 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1154', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1155" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1155', 'iterwalk', 'link-1065');">iterwalk</a></tt> </tt>
3362 <a name="L1036"></a><tt class="py-lineno">1036</tt> <tt class="py-line"> <tt id="link-1156" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1156', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1157" class="py-name"><a title="lxml.etree
3363 lxml.sax.ElementTreeContentHandler.etree
3364 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3365 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3366 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1157', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1158" class="py-name"><a title="lxml.etree.XML
3368 lxml.tests.test_objectify.ObjectifyTestCase.XML
3369 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1158', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-1159" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1159', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b><d/></b><c/></a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3370 <a name="L1037"></a><tt class="py-lineno">1037</tt> <tt class="py-line"> </tt>
3371 <a name="L1038"></a><tt class="py-lineno">1038</tt> <tt class="py-line"> <tt class="py-name">counts</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
3372 <a name="L1039"></a><tt class="py-lineno">1039</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">event</tt><tt class="py-op">,</tt> <tt class="py-name">elem</tt> <tt class="py-keyword">in</tt> <tt id="link-1160" class="py-name"><a title="lxml.etree.iterwalk" class="py-name" href="#" onclick="return doclink('link-1160', 'iterwalk', 'link-1065');">iterwalk</a></tt><tt class="py-op">(</tt><tt id="link-1161" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1161', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3373 <a name="L1040"></a><tt class="py-lineno">1040</tt> <tt class="py-line"> <tt class="py-name">counts</tt><tt class="py-op">.</tt><tt id="link-1162" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
3374 lxml.etree._Element.append
3375 lxml.etree._OpaqueDocumentWrapper.append
3376 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1162', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">elem</tt><tt class="py-op">.</tt><tt id="link-1163" class="py-name" targets="Method lxml.etree._Element.getiterator()=lxml.etree._Element-class.html#getiterator,Method lxml.etree._ElementTree.getiterator()=lxml.etree._ElementTree-class.html#getiterator"><a title="lxml.etree._Element.getiterator
3377 lxml.etree._ElementTree.getiterator" class="py-name" href="#" onclick="return doclink('link-1163', 'getiterator', 'link-1163');">getiterator</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3378 <a name="L1041"></a><tt class="py-lineno">1041</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
3379 <a name="L1042"></a><tt class="py-lineno">1042</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">,</tt><tt class="py-number">2</tt><tt class="py-op">,</tt><tt class="py-number">1</tt><tt class="py-op">,</tt><tt class="py-number">4</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
3380 <a name="L1043"></a><tt class="py-lineno">1043</tt> <tt class="py-line"> <tt class="py-name">counts</tt><tt class="py-op">)</tt> </tt>
3381 </div><a name="L1044"></a><tt class="py-lineno">1044</tt> <tt class="py-line"> </tt>
3382 <a name="ETreeOnlyTestCase.test_resolve_string_dtd"></a><div id="ETreeOnlyTestCase.test_resolve_string_dtd-def"><a name="L1045"></a><tt class="py-lineno">1045</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_resolve_string_dtd-toggle" onclick="return toggle('ETreeOnlyTestCase.test_resolve_string_dtd');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_resolve_string_dtd">test_resolve_string_dtd</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3383 </div><div id="ETreeOnlyTestCase.test_resolve_string_dtd-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_resolve_string_dtd-expanded"><a name="L1046"></a><tt class="py-lineno">1046</tt> <tt class="py-line"> <tt id="link-1164" class="py-name"><a title="lxml.cssselect.parse
3384 lxml.etree._ElementTree.parse
3386 lxml.html.ElementSoup.parse
3387 lxml.html.html5parser.parse
3389 lxml.html.soupparser.parse
3390 lxml.objectify.parse
3391 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1164', 'parse', 'link-757');">parse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1165" class="py-name"><a title="lxml.etree
3392 lxml.sax.ElementTreeContentHandler.etree
3393 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3394 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3395 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1165', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1166" class="py-name"><a title="lxml.cssselect.parse
3396 lxml.etree._ElementTree.parse
3398 lxml.html.ElementSoup.parse
3399 lxml.html.html5parser.parse
3401 lxml.html.soupparser.parse
3402 lxml.objectify.parse
3403 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1166', 'parse', 'link-757');">parse</a></tt> </tt>
3404 <a name="L1047"></a><tt class="py-lineno">1047</tt> <tt class="py-line"> <tt id="link-1167" class="py-name"><a title="lxml.etree._ElementTree.parser
3405 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1167', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1168" class="py-name"><a title="lxml.etree
3406 lxml.sax.ElementTreeContentHandler.etree
3407 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3408 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3409 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1168', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1169" class="py-name"><a title="lxml.etree.XMLParser
3410 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-1169', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt class="py-name">dtd_validation</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
3411 <a name="L1048"></a><tt class="py-lineno">1048</tt> <tt class="py-line"> <tt class="py-name">assertEqual</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEqual</tt> </tt>
3412 <a name="L1049"></a><tt class="py-lineno">1049</tt> <tt class="py-line"> <tt class="py-name">test_url</tt> <tt class="py-op">=</tt> <tt id="link-1170" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-1170', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">"__nosuch.dtd"</tt><tt class="py-op">)</tt> </tt>
3413 <a name="L1050"></a><tt class="py-lineno">1050</tt> <tt class="py-line"> </tt>
3414 <a name="L1051"></a><tt class="py-lineno">1051</tt> <tt class="py-line"> <tt class="py-keyword">class</tt> <tt class="py-def-name">MyResolver</tt><tt class="py-op">(</tt><tt class="py-base-class">self</tt><tt class="py-op">.</tt><tt class="py-base-class">etree</tt><tt class="py-op">.</tt><tt class="py-base-class">Resolver</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3415 <a name="L1052"></a><tt class="py-lineno">1052</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">resolve</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">url</tt><tt class="py-op">,</tt> <tt class="py-param">id</tt><tt class="py-op">,</tt> <tt class="py-param">context</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3416 <a name="L1053"></a><tt class="py-lineno">1053</tt> <tt class="py-line"> <tt class="py-name">assertEqual</tt><tt class="py-op">(</tt><tt class="py-name">url</tt><tt class="py-op">,</tt> <tt class="py-name">test_url</tt><tt class="py-op">)</tt> </tt>
3417 <a name="L1054"></a><tt class="py-lineno">1054</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1171" class="py-name" targets="Method lxml.etree.Resolver.resolve_string()=lxml.etree.Resolver-class.html#resolve_string"><a title="lxml.etree.Resolver.resolve_string" class="py-name" href="#" onclick="return doclink('link-1171', 'resolve_string', 'link-1171');">resolve_string</a></tt><tt class="py-op">(</tt> </tt>
3418 <a name="L1055"></a><tt class="py-lineno">1055</tt> <tt class="py-line"> <tt id="link-1172" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-1172', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'''<!ENTITY myentity "%s"></tt> </tt>
3419 <a name="L1056"></a><tt class="py-lineno">1056</tt> <tt class="py-line"><tt class="py-string"> <!ELEMENT doc ANY>'''</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">url</tt><tt class="py-op">,</tt> <tt class="py-name">context</tt><tt class="py-op">)</tt> </tt>
3420 </div></div><a name="L1057"></a><tt class="py-lineno">1057</tt> <tt class="py-line"> </tt>
3421 <a name="L1058"></a><tt class="py-lineno">1058</tt> <tt class="py-line"> <tt id="link-1173" class="py-name"><a title="lxml.etree._ElementTree.parser
3422 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1173', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-1174" class="py-name" targets="Variable lxml.etree._BaseParser.resolvers=lxml.etree._BaseParser-class.html#resolvers"><a title="lxml.etree._BaseParser.resolvers" class="py-name" href="#" onclick="return doclink('link-1174', 'resolvers', 'link-1174');">resolvers</a></tt><tt class="py-op">.</tt><tt id="link-1175" class="py-name" targets="Method lxml.etree._ResolverRegistry.add()=lxml.etree._ResolverRegistry-class.html#add,Method lxml.html.CheckboxValues.add()=lxml.html.CheckboxValues-class.html#add,Method lxml.html.MultipleSelectOptions.add()=lxml.html.MultipleSelectOptions-class.html#add"><a title="lxml.etree._ResolverRegistry.add
3423 lxml.html.CheckboxValues.add
3424 lxml.html.MultipleSelectOptions.add" class="py-name" href="#" onclick="return doclink('link-1175', 'add', 'link-1175');">add</a></tt><tt class="py-op">(</tt><tt class="py-name">MyResolver</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3425 <a name="L1059"></a><tt class="py-lineno">1059</tt> <tt class="py-line"> </tt>
3426 <a name="L1060"></a><tt class="py-lineno">1060</tt> <tt class="py-line"> <tt id="link-1176" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1176', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-1177" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-1177', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!DOCTYPE doc SYSTEM "%s"><doc>&myentity;</doc>'</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">test_url</tt> </tt>
3427 <a name="L1061"></a><tt class="py-lineno">1061</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-1178" class="py-name"><a title="lxml.cssselect.parse
3428 lxml.etree._ElementTree.parse
3430 lxml.html.ElementSoup.parse
3431 lxml.html.html5parser.parse
3433 lxml.html.soupparser.parse
3434 lxml.objectify.parse
3435 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1178', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt id="link-1179" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1179', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-1180" class="py-name"><a title="lxml.etree._ElementTree.parser
3436 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1180', 'parser', 'link-748');">parser</a></tt><tt class="py-op">)</tt> </tt>
3437 <a name="L1062"></a><tt class="py-lineno">1062</tt> <tt class="py-line"> <tt id="link-1181" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1181', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-1182" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-1182', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
3438 <a name="L1063"></a><tt class="py-lineno">1063</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1183" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1183', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1184" class="py-name"><a title="lxml.etree.QName.text
3439 lxml.etree._AppendOnlyElementProxy.text
3440 lxml.etree._Element.text
3441 lxml.etree._Entity.text
3442 lxml.etree._ModifyContentOnlyProxy.text
3443 lxml.etree._ReadOnlyEntityProxy.text
3444 lxml.etree._ReadOnlyProxy.text
3445 lxml.etree.__ContentOnlyElement.text
3446 lxml.objectify.ObjectifiedElement.text
3447 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-1184', 'text', 'link-194');">text</a></tt><tt class="py-op">,</tt> <tt class="py-name">test_url</tt><tt class="py-op">)</tt> </tt>
3448 </div><a name="L1064"></a><tt class="py-lineno">1064</tt> <tt class="py-line"> </tt>
3449 <a name="ETreeOnlyTestCase.test_resolve_bytes_dtd"></a><div id="ETreeOnlyTestCase.test_resolve_bytes_dtd-def"><a name="L1065"></a><tt class="py-lineno">1065</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_resolve_bytes_dtd-toggle" onclick="return toggle('ETreeOnlyTestCase.test_resolve_bytes_dtd');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_resolve_bytes_dtd">test_resolve_bytes_dtd</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3450 </div><div id="ETreeOnlyTestCase.test_resolve_bytes_dtd-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_resolve_bytes_dtd-expanded"><a name="L1066"></a><tt class="py-lineno">1066</tt> <tt class="py-line"> <tt id="link-1185" class="py-name"><a title="lxml.cssselect.parse
3451 lxml.etree._ElementTree.parse
3453 lxml.html.ElementSoup.parse
3454 lxml.html.html5parser.parse
3456 lxml.html.soupparser.parse
3457 lxml.objectify.parse
3458 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1185', 'parse', 'link-757');">parse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1186" class="py-name"><a title="lxml.etree
3459 lxml.sax.ElementTreeContentHandler.etree
3460 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3461 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3462 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1186', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1187" class="py-name"><a title="lxml.cssselect.parse
3463 lxml.etree._ElementTree.parse
3465 lxml.html.ElementSoup.parse
3466 lxml.html.html5parser.parse
3468 lxml.html.soupparser.parse
3469 lxml.objectify.parse
3470 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1187', 'parse', 'link-757');">parse</a></tt> </tt>
3471 <a name="L1067"></a><tt class="py-lineno">1067</tt> <tt class="py-line"> <tt id="link-1188" class="py-name"><a title="lxml.etree._ElementTree.parser
3472 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1188', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1189" class="py-name"><a title="lxml.etree
3473 lxml.sax.ElementTreeContentHandler.etree
3474 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3475 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3476 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1189', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1190" class="py-name"><a title="lxml.etree.XMLParser
3477 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-1190', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt class="py-name">dtd_validation</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
3478 <a name="L1068"></a><tt class="py-lineno">1068</tt> <tt class="py-line"> <tt class="py-name">assertEqual</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEqual</tt> </tt>
3479 <a name="L1069"></a><tt class="py-lineno">1069</tt> <tt class="py-line"> <tt class="py-name">test_url</tt> <tt class="py-op">=</tt> <tt id="link-1191" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-1191', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">"__nosuch.dtd"</tt><tt class="py-op">)</tt> </tt>
3480 <a name="L1070"></a><tt class="py-lineno">1070</tt> <tt class="py-line"> </tt>
3481 <a name="L1071"></a><tt class="py-lineno">1071</tt> <tt class="py-line"> <tt class="py-keyword">class</tt> <tt class="py-def-name">MyResolver</tt><tt class="py-op">(</tt><tt class="py-base-class">self</tt><tt class="py-op">.</tt><tt class="py-base-class">etree</tt><tt class="py-op">.</tt><tt class="py-base-class">Resolver</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3482 <a name="L1072"></a><tt class="py-lineno">1072</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">resolve</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">url</tt><tt class="py-op">,</tt> <tt class="py-param">id</tt><tt class="py-op">,</tt> <tt class="py-param">context</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3483 <a name="L1073"></a><tt class="py-lineno">1073</tt> <tt class="py-line"> <tt class="py-name">assertEqual</tt><tt class="py-op">(</tt><tt class="py-name">url</tt><tt class="py-op">,</tt> <tt class="py-name">test_url</tt><tt class="py-op">)</tt> </tt>
3484 <a name="L1074"></a><tt class="py-lineno">1074</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1192" class="py-name"><a title="lxml.etree.Resolver.resolve_string" class="py-name" href="#" onclick="return doclink('link-1192', 'resolve_string', 'link-1171');">resolve_string</a></tt><tt class="py-op">(</tt> </tt>
3485 <a name="L1075"></a><tt class="py-lineno">1075</tt> <tt class="py-line"> <tt class="py-op">(</tt><tt id="link-1193" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-1193', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'''<!ENTITY myentity "%s"></tt> </tt>
3486 <a name="L1076"></a><tt class="py-lineno">1076</tt> <tt class="py-line"><tt class="py-string"> <!ELEMENT doc ANY>'''</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">url</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">encode</tt><tt class="py-op">(</tt><tt class="py-string">'utf-8'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
3487 <a name="L1077"></a><tt class="py-lineno">1077</tt> <tt class="py-line"> <tt class="py-name">context</tt><tt class="py-op">)</tt> </tt>
3488 </div></div><a name="L1078"></a><tt class="py-lineno">1078</tt> <tt class="py-line"> </tt>
3489 <a name="L1079"></a><tt class="py-lineno">1079</tt> <tt class="py-line"> <tt id="link-1194" class="py-name"><a title="lxml.etree._ElementTree.parser
3490 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1194', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-1195" class="py-name"><a title="lxml.etree._BaseParser.resolvers" class="py-name" href="#" onclick="return doclink('link-1195', 'resolvers', 'link-1174');">resolvers</a></tt><tt class="py-op">.</tt><tt id="link-1196" class="py-name"><a title="lxml.etree._ResolverRegistry.add
3491 lxml.html.CheckboxValues.add
3492 lxml.html.MultipleSelectOptions.add" class="py-name" href="#" onclick="return doclink('link-1196', 'add', 'link-1175');">add</a></tt><tt class="py-op">(</tt><tt class="py-name">MyResolver</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3493 <a name="L1080"></a><tt class="py-lineno">1080</tt> <tt class="py-line"> </tt>
3494 <a name="L1081"></a><tt class="py-lineno">1081</tt> <tt class="py-line"> <tt id="link-1197" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1197', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-1198" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-1198', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!DOCTYPE doc SYSTEM "%s"><doc>&myentity;</doc>'</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">test_url</tt> </tt>
3495 <a name="L1082"></a><tt class="py-lineno">1082</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-1199" class="py-name"><a title="lxml.cssselect.parse
3496 lxml.etree._ElementTree.parse
3498 lxml.html.ElementSoup.parse
3499 lxml.html.html5parser.parse
3501 lxml.html.soupparser.parse
3502 lxml.objectify.parse
3503 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1199', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt id="link-1200" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1200', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-1201" class="py-name"><a title="lxml.etree._ElementTree.parser
3504 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1201', 'parser', 'link-748');">parser</a></tt><tt class="py-op">)</tt> </tt>
3505 <a name="L1083"></a><tt class="py-lineno">1083</tt> <tt class="py-line"> <tt id="link-1202" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1202', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-1203" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-1203', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
3506 <a name="L1084"></a><tt class="py-lineno">1084</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1204" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1204', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1205" class="py-name"><a title="lxml.etree.QName.text
3507 lxml.etree._AppendOnlyElementProxy.text
3508 lxml.etree._Element.text
3509 lxml.etree._Entity.text
3510 lxml.etree._ModifyContentOnlyProxy.text
3511 lxml.etree._ReadOnlyEntityProxy.text
3512 lxml.etree._ReadOnlyProxy.text
3513 lxml.etree.__ContentOnlyElement.text
3514 lxml.objectify.ObjectifiedElement.text
3515 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-1205', 'text', 'link-194');">text</a></tt><tt class="py-op">,</tt> <tt class="py-name">test_url</tt><tt class="py-op">)</tt> </tt>
3516 </div><a name="L1085"></a><tt class="py-lineno">1085</tt> <tt class="py-line"> </tt>
3517 <a name="ETreeOnlyTestCase.test_resolve_filelike_dtd"></a><div id="ETreeOnlyTestCase.test_resolve_filelike_dtd-def"><a name="L1086"></a><tt class="py-lineno">1086</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_resolve_filelike_dtd-toggle" onclick="return toggle('ETreeOnlyTestCase.test_resolve_filelike_dtd');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_resolve_filelike_dtd">test_resolve_filelike_dtd</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3518 </div><div id="ETreeOnlyTestCase.test_resolve_filelike_dtd-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_resolve_filelike_dtd-expanded"><a name="L1087"></a><tt class="py-lineno">1087</tt> <tt class="py-line"> <tt id="link-1206" class="py-name"><a title="lxml.cssselect.parse
3519 lxml.etree._ElementTree.parse
3521 lxml.html.ElementSoup.parse
3522 lxml.html.html5parser.parse
3524 lxml.html.soupparser.parse
3525 lxml.objectify.parse
3526 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1206', 'parse', 'link-757');">parse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1207" class="py-name"><a title="lxml.etree
3527 lxml.sax.ElementTreeContentHandler.etree
3528 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3529 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3530 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1207', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1208" class="py-name"><a title="lxml.cssselect.parse
3531 lxml.etree._ElementTree.parse
3533 lxml.html.ElementSoup.parse
3534 lxml.html.html5parser.parse
3536 lxml.html.soupparser.parse
3537 lxml.objectify.parse
3538 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1208', 'parse', 'link-757');">parse</a></tt> </tt>
3539 <a name="L1088"></a><tt class="py-lineno">1088</tt> <tt class="py-line"> <tt id="link-1209" class="py-name"><a title="lxml.etree._ElementTree.parser
3540 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1209', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1210" class="py-name"><a title="lxml.etree
3541 lxml.sax.ElementTreeContentHandler.etree
3542 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3543 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3544 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1210', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1211" class="py-name"><a title="lxml.etree.XMLParser
3545 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-1211', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt class="py-name">dtd_validation</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
3546 <a name="L1089"></a><tt class="py-lineno">1089</tt> <tt class="py-line"> <tt class="py-name">assertEqual</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEqual</tt> </tt>
3547 <a name="L1090"></a><tt class="py-lineno">1090</tt> <tt class="py-line"> <tt class="py-name">test_url</tt> <tt class="py-op">=</tt> <tt id="link-1212" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-1212', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">"__nosuch.dtd"</tt><tt class="py-op">)</tt> </tt>
3548 <a name="L1091"></a><tt class="py-lineno">1091</tt> <tt class="py-line"> </tt>
3549 <a name="L1092"></a><tt class="py-lineno">1092</tt> <tt class="py-line"> <tt class="py-keyword">class</tt> <tt class="py-def-name">MyResolver</tt><tt class="py-op">(</tt><tt class="py-base-class">self</tt><tt class="py-op">.</tt><tt class="py-base-class">etree</tt><tt class="py-op">.</tt><tt class="py-base-class">Resolver</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3550 <a name="L1093"></a><tt class="py-lineno">1093</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">resolve</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">url</tt><tt class="py-op">,</tt> <tt class="py-param">id</tt><tt class="py-op">,</tt> <tt class="py-param">context</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3551 <a name="L1094"></a><tt class="py-lineno">1094</tt> <tt class="py-line"> <tt class="py-name">assertEqual</tt><tt class="py-op">(</tt><tt class="py-name">url</tt><tt class="py-op">,</tt> <tt class="py-name">test_url</tt><tt class="py-op">)</tt> </tt>
3552 <a name="L1095"></a><tt class="py-lineno">1095</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1213" class="py-name" targets="Method lxml.etree.Resolver.resolve_file()=lxml.etree.Resolver-class.html#resolve_file"><a title="lxml.etree.Resolver.resolve_file" class="py-name" href="#" onclick="return doclink('link-1213', 'resolve_file', 'link-1213');">resolve_file</a></tt><tt class="py-op">(</tt> </tt>
3553 <a name="L1096"></a><tt class="py-lineno">1096</tt> <tt class="py-line"> <tt id="link-1214" class="py-name"><a title="lxml.tests.common_imports.SillyFileLike" class="py-name" href="#" onclick="return doclink('link-1214', 'SillyFileLike', 'link-15');">SillyFileLike</a></tt><tt class="py-op">(</tt> </tt>
3554 <a name="L1097"></a><tt class="py-lineno">1097</tt> <tt class="py-line"> <tt id="link-1215" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-1215', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'''<!ENTITY myentity "%s"></tt> </tt>
3555 <a name="L1098"></a><tt class="py-lineno">1098</tt> <tt class="py-line"><tt class="py-string"> <!ELEMENT doc ANY>'''</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">url</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">context</tt><tt class="py-op">)</tt> </tt>
3556 </div></div><a name="L1099"></a><tt class="py-lineno">1099</tt> <tt class="py-line"> </tt>
3557 <a name="L1100"></a><tt class="py-lineno">1100</tt> <tt class="py-line"> <tt id="link-1216" class="py-name"><a title="lxml.etree._ElementTree.parser
3558 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1216', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-1217" class="py-name"><a title="lxml.etree._BaseParser.resolvers" class="py-name" href="#" onclick="return doclink('link-1217', 'resolvers', 'link-1174');">resolvers</a></tt><tt class="py-op">.</tt><tt id="link-1218" class="py-name"><a title="lxml.etree._ResolverRegistry.add
3559 lxml.html.CheckboxValues.add
3560 lxml.html.MultipleSelectOptions.add" class="py-name" href="#" onclick="return doclink('link-1218', 'add', 'link-1175');">add</a></tt><tt class="py-op">(</tt><tt class="py-name">MyResolver</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3561 <a name="L1101"></a><tt class="py-lineno">1101</tt> <tt class="py-line"> </tt>
3562 <a name="L1102"></a><tt class="py-lineno">1102</tt> <tt class="py-line"> <tt id="link-1219" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1219', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-1220" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-1220', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!DOCTYPE doc SYSTEM "%s"><doc>&myentity;</doc>'</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">test_url</tt> </tt>
3563 <a name="L1103"></a><tt class="py-lineno">1103</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-1221" class="py-name"><a title="lxml.cssselect.parse
3564 lxml.etree._ElementTree.parse
3566 lxml.html.ElementSoup.parse
3567 lxml.html.html5parser.parse
3569 lxml.html.soupparser.parse
3570 lxml.objectify.parse
3571 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1221', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt id="link-1222" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1222', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-1223" class="py-name"><a title="lxml.etree._ElementTree.parser
3572 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1223', 'parser', 'link-748');">parser</a></tt><tt class="py-op">)</tt> </tt>
3573 <a name="L1104"></a><tt class="py-lineno">1104</tt> <tt class="py-line"> <tt id="link-1224" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1224', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-1225" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-1225', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
3574 <a name="L1105"></a><tt class="py-lineno">1105</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1226" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1226', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1227" class="py-name"><a title="lxml.etree.QName.text
3575 lxml.etree._AppendOnlyElementProxy.text
3576 lxml.etree._Element.text
3577 lxml.etree._Entity.text
3578 lxml.etree._ModifyContentOnlyProxy.text
3579 lxml.etree._ReadOnlyEntityProxy.text
3580 lxml.etree._ReadOnlyProxy.text
3581 lxml.etree.__ContentOnlyElement.text
3582 lxml.objectify.ObjectifiedElement.text
3583 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-1227', 'text', 'link-194');">text</a></tt><tt class="py-op">,</tt> <tt class="py-name">test_url</tt><tt class="py-op">)</tt> </tt>
3584 </div><a name="L1106"></a><tt class="py-lineno">1106</tt> <tt class="py-line"> </tt>
3585 <a name="ETreeOnlyTestCase.test_resolve_filename_dtd"></a><div id="ETreeOnlyTestCase.test_resolve_filename_dtd-def"><a name="L1107"></a><tt class="py-lineno">1107</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_resolve_filename_dtd-toggle" onclick="return toggle('ETreeOnlyTestCase.test_resolve_filename_dtd');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_resolve_filename_dtd">test_resolve_filename_dtd</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3586 </div><div id="ETreeOnlyTestCase.test_resolve_filename_dtd-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_resolve_filename_dtd-expanded"><a name="L1108"></a><tt class="py-lineno">1108</tt> <tt class="py-line"> <tt id="link-1228" class="py-name"><a title="lxml.cssselect.parse
3587 lxml.etree._ElementTree.parse
3589 lxml.html.ElementSoup.parse
3590 lxml.html.html5parser.parse
3592 lxml.html.soupparser.parse
3593 lxml.objectify.parse
3594 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1228', 'parse', 'link-757');">parse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1229" class="py-name"><a title="lxml.etree
3595 lxml.sax.ElementTreeContentHandler.etree
3596 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3597 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3598 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1229', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1230" class="py-name"><a title="lxml.cssselect.parse
3599 lxml.etree._ElementTree.parse
3601 lxml.html.ElementSoup.parse
3602 lxml.html.html5parser.parse
3604 lxml.html.soupparser.parse
3605 lxml.objectify.parse
3606 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1230', 'parse', 'link-757');">parse</a></tt> </tt>
3607 <a name="L1109"></a><tt class="py-lineno">1109</tt> <tt class="py-line"> <tt id="link-1231" class="py-name"><a title="lxml.etree._ElementTree.parser
3608 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1231', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1232" class="py-name"><a title="lxml.etree
3609 lxml.sax.ElementTreeContentHandler.etree
3610 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3611 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3612 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1232', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1233" class="py-name"><a title="lxml.etree.XMLParser
3613 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-1233', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt class="py-name">attribute_defaults</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
3614 <a name="L1110"></a><tt class="py-lineno">1110</tt> <tt class="py-line"> <tt class="py-name">assertEqual</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEqual</tt> </tt>
3615 <a name="L1111"></a><tt class="py-lineno">1111</tt> <tt class="py-line"> <tt class="py-name">test_url</tt> <tt class="py-op">=</tt> <tt id="link-1234" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-1234', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">"__nosuch.dtd"</tt><tt class="py-op">)</tt> </tt>
3616 <a name="L1112"></a><tt class="py-lineno">1112</tt> <tt class="py-line"> </tt>
3617 <a name="L1113"></a><tt class="py-lineno">1113</tt> <tt class="py-line"> <tt class="py-keyword">class</tt> <tt class="py-def-name">MyResolver</tt><tt class="py-op">(</tt><tt class="py-base-class">self</tt><tt class="py-op">.</tt><tt class="py-base-class">etree</tt><tt class="py-op">.</tt><tt class="py-base-class">Resolver</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3618 <a name="L1114"></a><tt class="py-lineno">1114</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">resolve</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">url</tt><tt class="py-op">,</tt> <tt class="py-param">id</tt><tt class="py-op">,</tt> <tt class="py-param">context</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3619 <a name="L1115"></a><tt class="py-lineno">1115</tt> <tt class="py-line"> <tt class="py-name">assertEqual</tt><tt class="py-op">(</tt><tt class="py-name">url</tt><tt class="py-op">,</tt> <tt class="py-name">test_url</tt><tt class="py-op">)</tt> </tt>
3620 <a name="L1116"></a><tt class="py-lineno">1116</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1235" class="py-name" targets="Method lxml.etree.Resolver.resolve_filename()=lxml.etree.Resolver-class.html#resolve_filename"><a title="lxml.etree.Resolver.resolve_filename" class="py-name" href="#" onclick="return doclink('link-1235', 'resolve_filename', 'link-1235');">resolve_filename</a></tt><tt class="py-op">(</tt> </tt>
3621 <a name="L1117"></a><tt class="py-lineno">1117</tt> <tt class="py-line"> <tt id="link-1236" class="py-name"><a title="lxml.tests.common_imports.fileInTestDir" class="py-name" href="#" onclick="return doclink('link-1236', 'fileInTestDir', 'link-12');">fileInTestDir</a></tt><tt class="py-op">(</tt><tt class="py-string">'test.dtd'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">context</tt><tt class="py-op">)</tt> </tt>
3622 </div></div><a name="L1118"></a><tt class="py-lineno">1118</tt> <tt class="py-line"> </tt>
3623 <a name="L1119"></a><tt class="py-lineno">1119</tt> <tt class="py-line"> <tt id="link-1237" class="py-name"><a title="lxml.etree._ElementTree.parser
3624 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1237', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-1238" class="py-name"><a title="lxml.etree._BaseParser.resolvers" class="py-name" href="#" onclick="return doclink('link-1238', 'resolvers', 'link-1174');">resolvers</a></tt><tt class="py-op">.</tt><tt id="link-1239" class="py-name"><a title="lxml.etree._ResolverRegistry.add
3625 lxml.html.CheckboxValues.add
3626 lxml.html.MultipleSelectOptions.add" class="py-name" href="#" onclick="return doclink('link-1239', 'add', 'link-1175');">add</a></tt><tt class="py-op">(</tt><tt class="py-name">MyResolver</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3627 <a name="L1120"></a><tt class="py-lineno">1120</tt> <tt class="py-line"> </tt>
3628 <a name="L1121"></a><tt class="py-lineno">1121</tt> <tt class="py-line"> <tt id="link-1240" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1240', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-1241" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-1241', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!DOCTYPE a SYSTEM "%s"><a><b/></a>'</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">test_url</tt> </tt>
3629 <a name="L1122"></a><tt class="py-lineno">1122</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-1242" class="py-name"><a title="lxml.cssselect.parse
3630 lxml.etree._ElementTree.parse
3632 lxml.html.ElementSoup.parse
3633 lxml.html.html5parser.parse
3635 lxml.html.soupparser.parse
3636 lxml.objectify.parse
3637 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1242', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt id="link-1243" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1243', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-1244" class="py-name"><a title="lxml.etree._ElementTree.parser
3638 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1244', 'parser', 'link-748');">parser</a></tt><tt class="py-op">)</tt> </tt>
3639 <a name="L1123"></a><tt class="py-lineno">1123</tt> <tt class="py-line"> <tt id="link-1245" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1245', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-1246" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-1246', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
3640 <a name="L1124"></a><tt class="py-lineno">1124</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
3641 <a name="L1125"></a><tt class="py-lineno">1125</tt> <tt class="py-line"> <tt id="link-1247" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1247', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1248" class="py-name"><a title="lxml.etree._Element.attrib
3642 lxml.etree._ProcessingInstruction.attrib
3643 lxml.etree._ReadOnlyElementProxy.attrib
3644 lxml.etree.__ContentOnlyElement.attrib
3645 xml.etree.ElementTree.Element.attrib" class="py-name" href="#" onclick="return doclink('link-1248', 'attrib', 'link-224');">attrib</a></tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-string">'default'</tt><tt class="py-op">:</tt> <tt class="py-string">'valueA'</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
3646 <a name="L1126"></a><tt class="py-lineno">1126</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
3647 <a name="L1127"></a><tt class="py-lineno">1127</tt> <tt class="py-line"> <tt id="link-1249" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1249', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1250" class="py-name"><a title="lxml.etree._Element.attrib
3648 lxml.etree._ProcessingInstruction.attrib
3649 lxml.etree._ReadOnlyElementProxy.attrib
3650 lxml.etree.__ContentOnlyElement.attrib
3651 xml.etree.ElementTree.Element.attrib" class="py-name" href="#" onclick="return doclink('link-1250', 'attrib', 'link-224');">attrib</a></tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-string">'default'</tt><tt class="py-op">:</tt> <tt class="py-string">'valueB'</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
3652 </div><a name="L1128"></a><tt class="py-lineno">1128</tt> <tt class="py-line"> </tt>
3653 <a name="ETreeOnlyTestCase.test_resolve_filename_dtd_relative"></a><div id="ETreeOnlyTestCase.test_resolve_filename_dtd_relative-def"><a name="L1129"></a><tt class="py-lineno">1129</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_resolve_filename_dtd_relative-toggle" onclick="return toggle('ETreeOnlyTestCase.test_resolve_filename_dtd_relative');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_resolve_filename_dtd_relative">test_resolve_filename_dtd_relative</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3654 </div><div id="ETreeOnlyTestCase.test_resolve_filename_dtd_relative-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_resolve_filename_dtd_relative-expanded"><a name="L1130"></a><tt class="py-lineno">1130</tt> <tt class="py-line"> <tt id="link-1251" class="py-name"><a title="lxml.cssselect.parse
3655 lxml.etree._ElementTree.parse
3657 lxml.html.ElementSoup.parse
3658 lxml.html.html5parser.parse
3660 lxml.html.soupparser.parse
3661 lxml.objectify.parse
3662 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1251', 'parse', 'link-757');">parse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1252" class="py-name"><a title="lxml.etree
3663 lxml.sax.ElementTreeContentHandler.etree
3664 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3665 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3666 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1252', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1253" class="py-name"><a title="lxml.cssselect.parse
3667 lxml.etree._ElementTree.parse
3669 lxml.html.ElementSoup.parse
3670 lxml.html.html5parser.parse
3672 lxml.html.soupparser.parse
3673 lxml.objectify.parse
3674 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1253', 'parse', 'link-757');">parse</a></tt> </tt>
3675 <a name="L1131"></a><tt class="py-lineno">1131</tt> <tt class="py-line"> <tt id="link-1254" class="py-name"><a title="lxml.etree._ElementTree.parser
3676 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1254', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1255" class="py-name"><a title="lxml.etree
3677 lxml.sax.ElementTreeContentHandler.etree
3678 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3679 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3680 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1255', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1256" class="py-name"><a title="lxml.etree.XMLParser
3681 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-1256', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt class="py-name">attribute_defaults</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
3682 <a name="L1132"></a><tt class="py-lineno">1132</tt> <tt class="py-line"> <tt class="py-name">assertEqual</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEqual</tt> </tt>
3683 <a name="L1133"></a><tt class="py-lineno">1133</tt> <tt class="py-line"> <tt class="py-name">test_url</tt> <tt class="py-op">=</tt> <tt id="link-1257" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-1257', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">"__nosuch.dtd"</tt><tt class="py-op">)</tt> </tt>
3684 <a name="L1134"></a><tt class="py-lineno">1134</tt> <tt class="py-line"> </tt>
3685 <a name="L1135"></a><tt class="py-lineno">1135</tt> <tt class="py-line"> <tt class="py-keyword">class</tt> <tt class="py-def-name">MyResolver</tt><tt class="py-op">(</tt><tt class="py-base-class">self</tt><tt class="py-op">.</tt><tt class="py-base-class">etree</tt><tt class="py-op">.</tt><tt class="py-base-class">Resolver</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3686 <a name="L1136"></a><tt class="py-lineno">1136</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">resolve</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">url</tt><tt class="py-op">,</tt> <tt class="py-param">id</tt><tt class="py-op">,</tt> <tt class="py-param">context</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3687 <a name="L1137"></a><tt class="py-lineno">1137</tt> <tt class="py-line"> <tt class="py-name">assertEqual</tt><tt class="py-op">(</tt><tt class="py-name">url</tt><tt class="py-op">,</tt> <tt id="link-1258" class="py-name"><a title="lxml.tests.common_imports.fileInTestDir" class="py-name" href="#" onclick="return doclink('link-1258', 'fileInTestDir', 'link-12');">fileInTestDir</a></tt><tt class="py-op">(</tt><tt class="py-name">test_url</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3688 <a name="L1138"></a><tt class="py-lineno">1138</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1259" class="py-name"><a title="lxml.etree.Resolver.resolve_filename" class="py-name" href="#" onclick="return doclink('link-1259', 'resolve_filename', 'link-1235');">resolve_filename</a></tt><tt class="py-op">(</tt> </tt>
3689 <a name="L1139"></a><tt class="py-lineno">1139</tt> <tt class="py-line"> <tt id="link-1260" class="py-name"><a title="lxml.tests.common_imports.fileInTestDir" class="py-name" href="#" onclick="return doclink('link-1260', 'fileInTestDir', 'link-12');">fileInTestDir</a></tt><tt class="py-op">(</tt><tt class="py-string">'test.dtd'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">context</tt><tt class="py-op">)</tt> </tt>
3690 </div></div><a name="L1140"></a><tt class="py-lineno">1140</tt> <tt class="py-line"> </tt>
3691 <a name="L1141"></a><tt class="py-lineno">1141</tt> <tt class="py-line"> <tt id="link-1261" class="py-name"><a title="lxml.etree._ElementTree.parser
3692 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1261', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-1262" class="py-name"><a title="lxml.etree._BaseParser.resolvers" class="py-name" href="#" onclick="return doclink('link-1262', 'resolvers', 'link-1174');">resolvers</a></tt><tt class="py-op">.</tt><tt id="link-1263" class="py-name"><a title="lxml.etree._ResolverRegistry.add
3693 lxml.html.CheckboxValues.add
3694 lxml.html.MultipleSelectOptions.add" class="py-name" href="#" onclick="return doclink('link-1263', 'add', 'link-1175');">add</a></tt><tt class="py-op">(</tt><tt class="py-name">MyResolver</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3695 <a name="L1142"></a><tt class="py-lineno">1142</tt> <tt class="py-line"> </tt>
3696 <a name="L1143"></a><tt class="py-lineno">1143</tt> <tt class="py-line"> <tt id="link-1264" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1264', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-1265" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-1265', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!DOCTYPE a SYSTEM "%s"><a><b/></a>'</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">test_url</tt> </tt>
3697 <a name="L1144"></a><tt class="py-lineno">1144</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-1266" class="py-name"><a title="lxml.cssselect.parse
3698 lxml.etree._ElementTree.parse
3700 lxml.html.ElementSoup.parse
3701 lxml.html.html5parser.parse
3703 lxml.html.soupparser.parse
3704 lxml.objectify.parse
3705 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1266', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt id="link-1267" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1267', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-1268" class="py-name"><a title="lxml.etree._ElementTree.parser
3706 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1268', 'parser', 'link-748');">parser</a></tt><tt class="py-op">,</tt> </tt>
3707 <a name="L1145"></a><tt class="py-lineno">1145</tt> <tt class="py-line"> <tt id="link-1269" class="py-name" targets="Variable lxml.html.HtmlMixin.base_url=lxml.html.HtmlMixin-class.html#base_url"><a title="lxml.html.HtmlMixin.base_url" class="py-name" href="#" onclick="return doclink('link-1269', 'base_url', 'link-1269');">base_url</a></tt><tt class="py-op">=</tt><tt id="link-1270" class="py-name"><a title="lxml.tests.common_imports.fileInTestDir" class="py-name" href="#" onclick="return doclink('link-1270', 'fileInTestDir', 'link-12');">fileInTestDir</a></tt><tt class="py-op">(</tt><tt class="py-string">'__test.xml'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3708 <a name="L1146"></a><tt class="py-lineno">1146</tt> <tt class="py-line"> <tt id="link-1271" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1271', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-1272" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-1272', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
3709 <a name="L1147"></a><tt class="py-lineno">1147</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
3710 <a name="L1148"></a><tt class="py-lineno">1148</tt> <tt class="py-line"> <tt id="link-1273" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1273', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1274" class="py-name"><a title="lxml.etree._Element.attrib
3711 lxml.etree._ProcessingInstruction.attrib
3712 lxml.etree._ReadOnlyElementProxy.attrib
3713 lxml.etree.__ContentOnlyElement.attrib
3714 xml.etree.ElementTree.Element.attrib" class="py-name" href="#" onclick="return doclink('link-1274', 'attrib', 'link-224');">attrib</a></tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-string">'default'</tt><tt class="py-op">:</tt> <tt class="py-string">'valueA'</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
3715 <a name="L1149"></a><tt class="py-lineno">1149</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
3716 <a name="L1150"></a><tt class="py-lineno">1150</tt> <tt class="py-line"> <tt id="link-1275" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1275', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1276" class="py-name"><a title="lxml.etree._Element.attrib
3717 lxml.etree._ProcessingInstruction.attrib
3718 lxml.etree._ReadOnlyElementProxy.attrib
3719 lxml.etree.__ContentOnlyElement.attrib
3720 xml.etree.ElementTree.Element.attrib" class="py-name" href="#" onclick="return doclink('link-1276', 'attrib', 'link-224');">attrib</a></tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-string">'default'</tt><tt class="py-op">:</tt> <tt class="py-string">'valueB'</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
3721 </div><a name="L1151"></a><tt class="py-lineno">1151</tt> <tt class="py-line"> </tt>
3722 <a name="ETreeOnlyTestCase.test_resolve_file_dtd"></a><div id="ETreeOnlyTestCase.test_resolve_file_dtd-def"><a name="L1152"></a><tt class="py-lineno">1152</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_resolve_file_dtd-toggle" onclick="return toggle('ETreeOnlyTestCase.test_resolve_file_dtd');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_resolve_file_dtd">test_resolve_file_dtd</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3723 </div><div id="ETreeOnlyTestCase.test_resolve_file_dtd-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_resolve_file_dtd-expanded"><a name="L1153"></a><tt class="py-lineno">1153</tt> <tt class="py-line"> <tt id="link-1277" class="py-name"><a title="lxml.cssselect.parse
3724 lxml.etree._ElementTree.parse
3726 lxml.html.ElementSoup.parse
3727 lxml.html.html5parser.parse
3729 lxml.html.soupparser.parse
3730 lxml.objectify.parse
3731 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1277', 'parse', 'link-757');">parse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1278" class="py-name"><a title="lxml.etree
3732 lxml.sax.ElementTreeContentHandler.etree
3733 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3734 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3735 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1278', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1279" class="py-name"><a title="lxml.cssselect.parse
3736 lxml.etree._ElementTree.parse
3738 lxml.html.ElementSoup.parse
3739 lxml.html.html5parser.parse
3741 lxml.html.soupparser.parse
3742 lxml.objectify.parse
3743 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1279', 'parse', 'link-757');">parse</a></tt> </tt>
3744 <a name="L1154"></a><tt class="py-lineno">1154</tt> <tt class="py-line"> <tt id="link-1280" class="py-name"><a title="lxml.etree._ElementTree.parser
3745 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1280', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1281" class="py-name"><a title="lxml.etree
3746 lxml.sax.ElementTreeContentHandler.etree
3747 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3748 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3749 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1281', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1282" class="py-name"><a title="lxml.etree.XMLParser
3750 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-1282', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt class="py-name">attribute_defaults</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
3751 <a name="L1155"></a><tt class="py-lineno">1155</tt> <tt class="py-line"> <tt class="py-name">assertEqual</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEqual</tt> </tt>
3752 <a name="L1156"></a><tt class="py-lineno">1156</tt> <tt class="py-line"> <tt class="py-name">test_url</tt> <tt class="py-op">=</tt> <tt id="link-1283" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-1283', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">"__nosuch.dtd"</tt><tt class="py-op">)</tt> </tt>
3753 <a name="L1157"></a><tt class="py-lineno">1157</tt> <tt class="py-line"> </tt>
3754 <a name="L1158"></a><tt class="py-lineno">1158</tt> <tt class="py-line"> <tt class="py-keyword">class</tt> <tt class="py-def-name">MyResolver</tt><tt class="py-op">(</tt><tt class="py-base-class">self</tt><tt class="py-op">.</tt><tt class="py-base-class">etree</tt><tt class="py-op">.</tt><tt class="py-base-class">Resolver</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3755 <a name="L1159"></a><tt class="py-lineno">1159</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">resolve</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">url</tt><tt class="py-op">,</tt> <tt class="py-param">id</tt><tt class="py-op">,</tt> <tt class="py-param">context</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3756 <a name="L1160"></a><tt class="py-lineno">1160</tt> <tt class="py-line"> <tt class="py-name">assertEqual</tt><tt class="py-op">(</tt><tt class="py-name">url</tt><tt class="py-op">,</tt> <tt class="py-name">test_url</tt><tt class="py-op">)</tt> </tt>
3757 <a name="L1161"></a><tt class="py-lineno">1161</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1284" class="py-name"><a title="lxml.etree.Resolver.resolve_file" class="py-name" href="#" onclick="return doclink('link-1284', 'resolve_file', 'link-1213');">resolve_file</a></tt><tt class="py-op">(</tt> </tt>
3758 <a name="L1162"></a><tt class="py-lineno">1162</tt> <tt class="py-line"> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt id="link-1285" class="py-name"><a title="lxml.tests.common_imports.fileInTestDir" class="py-name" href="#" onclick="return doclink('link-1285', 'fileInTestDir', 'link-12');">fileInTestDir</a></tt><tt class="py-op">(</tt><tt class="py-string">'test.dtd'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'rb'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">context</tt><tt class="py-op">)</tt> </tt>
3759 </div></div><a name="L1163"></a><tt class="py-lineno">1163</tt> <tt class="py-line"> </tt>
3760 <a name="L1164"></a><tt class="py-lineno">1164</tt> <tt class="py-line"> <tt id="link-1286" class="py-name"><a title="lxml.etree._ElementTree.parser
3761 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1286', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-1287" class="py-name"><a title="lxml.etree._BaseParser.resolvers" class="py-name" href="#" onclick="return doclink('link-1287', 'resolvers', 'link-1174');">resolvers</a></tt><tt class="py-op">.</tt><tt id="link-1288" class="py-name"><a title="lxml.etree._ResolverRegistry.add
3762 lxml.html.CheckboxValues.add
3763 lxml.html.MultipleSelectOptions.add" class="py-name" href="#" onclick="return doclink('link-1288', 'add', 'link-1175');">add</a></tt><tt class="py-op">(</tt><tt class="py-name">MyResolver</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3764 <a name="L1165"></a><tt class="py-lineno">1165</tt> <tt class="py-line"> </tt>
3765 <a name="L1166"></a><tt class="py-lineno">1166</tt> <tt class="py-line"> <tt id="link-1289" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1289', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-1290" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-1290', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!DOCTYPE a SYSTEM "%s"><a><b/></a>'</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">test_url</tt> </tt>
3766 <a name="L1167"></a><tt class="py-lineno">1167</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-1291" class="py-name"><a title="lxml.cssselect.parse
3767 lxml.etree._ElementTree.parse
3769 lxml.html.ElementSoup.parse
3770 lxml.html.html5parser.parse
3772 lxml.html.soupparser.parse
3773 lxml.objectify.parse
3774 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1291', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt id="link-1292" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1292', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-1293" class="py-name"><a title="lxml.etree._ElementTree.parser
3775 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1293', 'parser', 'link-748');">parser</a></tt><tt class="py-op">)</tt> </tt>
3776 <a name="L1168"></a><tt class="py-lineno">1168</tt> <tt class="py-line"> <tt id="link-1294" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1294', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-1295" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-1295', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
3777 <a name="L1169"></a><tt class="py-lineno">1169</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
3778 <a name="L1170"></a><tt class="py-lineno">1170</tt> <tt class="py-line"> <tt id="link-1296" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1296', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1297" class="py-name"><a title="lxml.etree._Element.attrib
3779 lxml.etree._ProcessingInstruction.attrib
3780 lxml.etree._ReadOnlyElementProxy.attrib
3781 lxml.etree.__ContentOnlyElement.attrib
3782 xml.etree.ElementTree.Element.attrib" class="py-name" href="#" onclick="return doclink('link-1297', 'attrib', 'link-224');">attrib</a></tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-string">'default'</tt><tt class="py-op">:</tt> <tt class="py-string">'valueA'</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
3783 <a name="L1171"></a><tt class="py-lineno">1171</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
3784 <a name="L1172"></a><tt class="py-lineno">1172</tt> <tt class="py-line"> <tt id="link-1298" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1298', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1299" class="py-name"><a title="lxml.etree._Element.attrib
3785 lxml.etree._ProcessingInstruction.attrib
3786 lxml.etree._ReadOnlyElementProxy.attrib
3787 lxml.etree.__ContentOnlyElement.attrib
3788 xml.etree.ElementTree.Element.attrib" class="py-name" href="#" onclick="return doclink('link-1299', 'attrib', 'link-224');">attrib</a></tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-string">'default'</tt><tt class="py-op">:</tt> <tt class="py-string">'valueB'</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
3789 </div><a name="L1173"></a><tt class="py-lineno">1173</tt> <tt class="py-line"> </tt>
3790 <a name="ETreeOnlyTestCase.test_resolve_empty"></a><div id="ETreeOnlyTestCase.test_resolve_empty-def"><a name="L1174"></a><tt class="py-lineno">1174</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_resolve_empty-toggle" onclick="return toggle('ETreeOnlyTestCase.test_resolve_empty');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_resolve_empty">test_resolve_empty</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3791 </div><div id="ETreeOnlyTestCase.test_resolve_empty-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_resolve_empty-expanded"><a name="L1175"></a><tt class="py-lineno">1175</tt> <tt class="py-line"> <tt id="link-1300" class="py-name"><a title="lxml.cssselect.parse
3792 lxml.etree._ElementTree.parse
3794 lxml.html.ElementSoup.parse
3795 lxml.html.html5parser.parse
3797 lxml.html.soupparser.parse
3798 lxml.objectify.parse
3799 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1300', 'parse', 'link-757');">parse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1301" class="py-name"><a title="lxml.etree
3800 lxml.sax.ElementTreeContentHandler.etree
3801 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3802 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3803 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1301', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1302" class="py-name"><a title="lxml.cssselect.parse
3804 lxml.etree._ElementTree.parse
3806 lxml.html.ElementSoup.parse
3807 lxml.html.html5parser.parse
3809 lxml.html.soupparser.parse
3810 lxml.objectify.parse
3811 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1302', 'parse', 'link-757');">parse</a></tt> </tt>
3812 <a name="L1176"></a><tt class="py-lineno">1176</tt> <tt class="py-line"> <tt id="link-1303" class="py-name"><a title="lxml.etree._ElementTree.parser
3813 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1303', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1304" class="py-name"><a title="lxml.etree
3814 lxml.sax.ElementTreeContentHandler.etree
3815 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3816 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3817 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1304', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1305" class="py-name"><a title="lxml.etree.XMLParser
3818 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-1305', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt class="py-name">load_dtd</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
3819 <a name="L1177"></a><tt class="py-lineno">1177</tt> <tt class="py-line"> <tt class="py-name">assertEqual</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEqual</tt> </tt>
3820 <a name="L1178"></a><tt class="py-lineno">1178</tt> <tt class="py-line"> <tt class="py-name">test_url</tt> <tt class="py-op">=</tt> <tt id="link-1306" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-1306', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">"__nosuch.dtd"</tt><tt class="py-op">)</tt> </tt>
3821 <a name="L1179"></a><tt class="py-lineno">1179</tt> <tt class="py-line"> </tt>
3822 <a name="L1180"></a><tt class="py-lineno">1180</tt> <tt class="py-line"> <tt class="py-keyword">class</tt> <tt class="py-def-name">check</tt><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3823 <a name="L1181"></a><tt class="py-lineno">1181</tt> <tt class="py-line"> <tt class="py-name">resolved</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
3824 </div><a name="L1182"></a><tt class="py-lineno">1182</tt> <tt class="py-line"> </tt>
3825 <a name="L1183"></a><tt class="py-lineno">1183</tt> <tt class="py-line"> <tt class="py-keyword">class</tt> <tt class="py-def-name">MyResolver</tt><tt class="py-op">(</tt><tt class="py-base-class">self</tt><tt class="py-op">.</tt><tt class="py-base-class">etree</tt><tt class="py-op">.</tt><tt class="py-base-class">Resolver</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3826 <a name="L1184"></a><tt class="py-lineno">1184</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">resolve</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">url</tt><tt class="py-op">,</tt> <tt class="py-param">id</tt><tt class="py-op">,</tt> <tt class="py-param">context</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3827 <a name="L1185"></a><tt class="py-lineno">1185</tt> <tt class="py-line"> <tt class="py-name">assertEqual</tt><tt class="py-op">(</tt><tt class="py-name">url</tt><tt class="py-op">,</tt> <tt class="py-name">test_url</tt><tt class="py-op">)</tt> </tt>
3828 <a name="L1186"></a><tt class="py-lineno">1186</tt> <tt class="py-line"> <tt class="py-name">check</tt><tt class="py-op">.</tt><tt class="py-name">resolved</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
3829 <a name="L1187"></a><tt class="py-lineno">1187</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1307" class="py-name" targets="Method lxml.etree.Resolver.resolve_empty()=lxml.etree.Resolver-class.html#resolve_empty"><a title="lxml.etree.Resolver.resolve_empty" class="py-name" href="#" onclick="return doclink('link-1307', 'resolve_empty', 'link-1307');">resolve_empty</a></tt><tt class="py-op">(</tt><tt class="py-name">context</tt><tt class="py-op">)</tt> </tt>
3830 </div></div><a name="L1188"></a><tt class="py-lineno">1188</tt> <tt class="py-line"> </tt>
3831 <a name="L1189"></a><tt class="py-lineno">1189</tt> <tt class="py-line"> <tt id="link-1308" class="py-name"><a title="lxml.etree._ElementTree.parser
3832 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1308', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-1309" class="py-name"><a title="lxml.etree._BaseParser.resolvers" class="py-name" href="#" onclick="return doclink('link-1309', 'resolvers', 'link-1174');">resolvers</a></tt><tt class="py-op">.</tt><tt id="link-1310" class="py-name"><a title="lxml.etree._ResolverRegistry.add
3833 lxml.html.CheckboxValues.add
3834 lxml.html.MultipleSelectOptions.add" class="py-name" href="#" onclick="return doclink('link-1310', 'add', 'link-1175');">add</a></tt><tt class="py-op">(</tt><tt class="py-name">MyResolver</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3835 <a name="L1190"></a><tt class="py-lineno">1190</tt> <tt class="py-line"> </tt>
3836 <a name="L1191"></a><tt class="py-lineno">1191</tt> <tt class="py-line"> <tt id="link-1311" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1311', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-1312" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-1312', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!DOCTYPE doc SYSTEM "%s"><doc>&myentity;</doc>'</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">test_url</tt> </tt>
3837 <a name="L1192"></a><tt class="py-lineno">1192</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt id="link-1313" class="py-name"><a title="lxml.etree
3838 lxml.sax.ElementTreeContentHandler.etree
3839 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3840 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3841 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1313', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1314" class="py-name"><a title="lxml.etree.XMLSyntaxError" class="py-name" href="#" onclick="return doclink('link-1314', 'XMLSyntaxError', 'link-842');">XMLSyntaxError</a></tt><tt class="py-op">,</tt> <tt id="link-1315" class="py-name"><a title="lxml.cssselect.parse
3842 lxml.etree._ElementTree.parse
3844 lxml.html.ElementSoup.parse
3845 lxml.html.html5parser.parse
3847 lxml.html.soupparser.parse
3848 lxml.objectify.parse
3849 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1315', 'parse', 'link-757');">parse</a></tt><tt class="py-op">,</tt> <tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt id="link-1316" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1316', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-1317" class="py-name"><a title="lxml.etree._ElementTree.parser
3850 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1317', 'parser', 'link-748');">parser</a></tt><tt class="py-op">)</tt> </tt>
3851 <a name="L1193"></a><tt class="py-lineno">1193</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1318" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-1318', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-name">check</tt><tt class="py-op">.</tt><tt class="py-name">resolved</tt><tt class="py-op">)</tt> </tt>
3852 </div><a name="L1194"></a><tt class="py-lineno">1194</tt> <tt class="py-line"> </tt>
3853 <a name="ETreeOnlyTestCase.test_resolve_error"></a><div id="ETreeOnlyTestCase.test_resolve_error-def"><a name="L1195"></a><tt class="py-lineno">1195</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_resolve_error-toggle" onclick="return toggle('ETreeOnlyTestCase.test_resolve_error');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_resolve_error">test_resolve_error</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3854 </div><div id="ETreeOnlyTestCase.test_resolve_error-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_resolve_error-expanded"><a name="L1196"></a><tt class="py-lineno">1196</tt> <tt class="py-line"> <tt id="link-1319" class="py-name"><a title="lxml.cssselect.parse
3855 lxml.etree._ElementTree.parse
3857 lxml.html.ElementSoup.parse
3858 lxml.html.html5parser.parse
3860 lxml.html.soupparser.parse
3861 lxml.objectify.parse
3862 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1319', 'parse', 'link-757');">parse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1320" class="py-name"><a title="lxml.etree
3863 lxml.sax.ElementTreeContentHandler.etree
3864 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3865 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3866 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1320', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1321" class="py-name"><a title="lxml.cssselect.parse
3867 lxml.etree._ElementTree.parse
3869 lxml.html.ElementSoup.parse
3870 lxml.html.html5parser.parse
3872 lxml.html.soupparser.parse
3873 lxml.objectify.parse
3874 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1321', 'parse', 'link-757');">parse</a></tt> </tt>
3875 <a name="L1197"></a><tt class="py-lineno">1197</tt> <tt class="py-line"> <tt id="link-1322" class="py-name"><a title="lxml.etree._ElementTree.parser
3876 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1322', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1323" class="py-name"><a title="lxml.etree
3877 lxml.sax.ElementTreeContentHandler.etree
3878 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3879 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3880 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1323', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1324" class="py-name"><a title="lxml.etree.XMLParser
3881 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-1324', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt class="py-name">dtd_validation</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
3882 <a name="L1198"></a><tt class="py-lineno">1198</tt> <tt class="py-line"> </tt>
3883 <a name="L1199"></a><tt class="py-lineno">1199</tt> <tt class="py-line"> <tt class="py-keyword">class</tt> <tt class="py-def-name">_LocalException</tt><tt class="py-op">(</tt><tt class="py-base-class">Exception</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3884 <a name="L1200"></a><tt class="py-lineno">1200</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
3885 </div><a name="L1201"></a><tt class="py-lineno">1201</tt> <tt class="py-line"> </tt>
3886 <a name="L1202"></a><tt class="py-lineno">1202</tt> <tt class="py-line"> <tt class="py-keyword">class</tt> <tt class="py-def-name">MyResolver</tt><tt class="py-op">(</tt><tt class="py-base-class">self</tt><tt class="py-op">.</tt><tt class="py-base-class">etree</tt><tt class="py-op">.</tt><tt class="py-base-class">Resolver</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3887 <a name="L1203"></a><tt class="py-lineno">1203</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">resolve</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">url</tt><tt class="py-op">,</tt> <tt class="py-param">id</tt><tt class="py-op">,</tt> <tt class="py-param">context</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3888 <a name="L1204"></a><tt class="py-lineno">1204</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">_LocalException</tt> </tt>
3889 </div></div><a name="L1205"></a><tt class="py-lineno">1205</tt> <tt class="py-line"> </tt>
3890 <a name="L1206"></a><tt class="py-lineno">1206</tt> <tt class="py-line"> <tt id="link-1325" class="py-name"><a title="lxml.etree._ElementTree.parser
3891 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1325', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-1326" class="py-name"><a title="lxml.etree._BaseParser.resolvers" class="py-name" href="#" onclick="return doclink('link-1326', 'resolvers', 'link-1174');">resolvers</a></tt><tt class="py-op">.</tt><tt id="link-1327" class="py-name"><a title="lxml.etree._ResolverRegistry.add
3892 lxml.html.CheckboxValues.add
3893 lxml.html.MultipleSelectOptions.add" class="py-name" href="#" onclick="return doclink('link-1327', 'add', 'link-1175');">add</a></tt><tt class="py-op">(</tt><tt class="py-name">MyResolver</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3894 <a name="L1207"></a><tt class="py-lineno">1207</tt> <tt class="py-line"> </tt>
3895 <a name="L1208"></a><tt class="py-lineno">1208</tt> <tt class="py-line"> <tt id="link-1328" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1328', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'<!DOCTYPE doc SYSTEM "test"><doc>&myentity;</doc>'</tt> </tt>
3896 <a name="L1209"></a><tt class="py-lineno">1209</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">_LocalException</tt><tt class="py-op">,</tt> <tt id="link-1329" class="py-name"><a title="lxml.cssselect.parse
3897 lxml.etree._ElementTree.parse
3899 lxml.html.ElementSoup.parse
3900 lxml.html.html5parser.parse
3902 lxml.html.soupparser.parse
3903 lxml.objectify.parse
3904 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1329', 'parse', 'link-757');">parse</a></tt><tt class="py-op">,</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt id="link-1330" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1330', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-1331" class="py-name"><a title="lxml.etree._ElementTree.parser
3905 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1331', 'parser', 'link-748');">parser</a></tt><tt class="py-op">)</tt> </tt>
3906 </div><a name="L1210"></a><tt class="py-lineno">1210</tt> <tt class="py-line"> </tt>
3907 <a name="L1211"></a><tt class="py-lineno">1211</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-1332" class="py-name"><a title="lxml.etree
3908 lxml.sax.ElementTreeContentHandler.etree
3909 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3910 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3911 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1332', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1333" class="py-name"><a title="lxml.etree.LIBXML_VERSION" class="py-name" href="#" onclick="return doclink('link-1333', 'LIBXML_VERSION', 'link-26');">LIBXML_VERSION</a></tt> <tt class="py-op">></tt> <tt class="py-op">(</tt><tt class="py-number">2</tt><tt class="py-op">,</tt><tt class="py-number">6</tt><tt class="py-op">,</tt><tt class="py-number">20</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3912 <a name="ETreeOnlyTestCase.test_entity_parse"></a><div id="ETreeOnlyTestCase.test_entity_parse-def"><a name="L1212"></a><tt class="py-lineno">1212</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_entity_parse-toggle" onclick="return toggle('ETreeOnlyTestCase.test_entity_parse');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_entity_parse">test_entity_parse</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
3913 </div><div id="ETreeOnlyTestCase.test_entity_parse-collapsed" style="display:none;" pad="++++" indent="++++++++++++++++"></div><div id="ETreeOnlyTestCase.test_entity_parse-expanded"><a name="L1213"></a><tt class="py-lineno">1213</tt> <tt class="py-line"> <tt id="link-1334" class="py-name"><a title="lxml.cssselect.parse
3914 lxml.etree._ElementTree.parse
3916 lxml.html.ElementSoup.parse
3917 lxml.html.html5parser.parse
3919 lxml.html.soupparser.parse
3920 lxml.objectify.parse
3921 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1334', 'parse', 'link-757');">parse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1335" class="py-name"><a title="lxml.etree
3922 lxml.sax.ElementTreeContentHandler.etree
3923 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3924 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3925 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1335', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1336" class="py-name"><a title="lxml.cssselect.parse
3926 lxml.etree._ElementTree.parse
3928 lxml.html.ElementSoup.parse
3929 lxml.html.html5parser.parse
3931 lxml.html.soupparser.parse
3932 lxml.objectify.parse
3933 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1336', 'parse', 'link-757');">parse</a></tt> </tt>
3934 <a name="L1214"></a><tt class="py-lineno">1214</tt> <tt class="py-line"> <tt id="link-1337" class="py-name"><a title="lxml.etree.XSLT.tostring
3936 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-1337', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1338" class="py-name"><a title="lxml.etree
3937 lxml.sax.ElementTreeContentHandler.etree
3938 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3939 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3940 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1338', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1339" class="py-name"><a title="lxml.etree.XSLT.tostring
3942 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-1339', 'tostring', 'link-597');">tostring</a></tt> </tt>
3943 <a name="L1215"></a><tt class="py-lineno">1215</tt> <tt class="py-line"> <tt id="link-1340" class="py-name"><a title="lxml.etree._ElementTree.parser
3944 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1340', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1341" class="py-name"><a title="lxml.etree
3945 lxml.sax.ElementTreeContentHandler.etree
3946 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3947 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3948 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1341', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1342" class="py-name"><a title="lxml.etree.XMLParser
3949 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-1342', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt class="py-name">resolve_entities</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
3950 <a name="L1216"></a><tt class="py-lineno">1216</tt> <tt class="py-line"> <tt id="link-1343" class="py-name" targets="Function lxml.etree.Entity()=lxml.etree-module.html#Entity"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-1343', 'Entity', 'link-1343');">Entity</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1344" class="py-name"><a title="lxml.etree
3951 lxml.sax.ElementTreeContentHandler.etree
3952 lxml.tests.test_elementtree.CElementTreeTestCase.etree
3953 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
3954 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1344', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1345" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-1345', 'Entity', 'link-1343');">Entity</a></tt> </tt>
3955 <a name="L1217"></a><tt class="py-lineno">1217</tt> <tt class="py-line"> </tt>
3956 <a name="L1218"></a><tt class="py-lineno">1218</tt> <tt class="py-line"> <tt id="link-1346" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1346', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-1347" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1347', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!DOCTYPE doc SYSTEM "test"><doc>&myentity;</doc>'</tt><tt class="py-op">)</tt> </tt>
3957 <a name="L1219"></a><tt class="py-lineno">1219</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-1348" class="py-name"><a title="lxml.cssselect.parse
3958 lxml.etree._ElementTree.parse
3960 lxml.html.ElementSoup.parse
3961 lxml.html.html5parser.parse
3963 lxml.html.soupparser.parse
3964 lxml.objectify.parse
3965 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-1348', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt id="link-1349" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1349', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-1350" class="py-name"><a title="lxml.etree._ElementTree.parser
3966 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1350', 'parser', 'link-748');">parser</a></tt><tt class="py-op">)</tt> </tt>
3967 <a name="L1220"></a><tt class="py-lineno">1220</tt> <tt class="py-line"> <tt id="link-1351" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1351', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-1352" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-1352', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
3968 <a name="L1221"></a><tt class="py-lineno">1221</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1353" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1353', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1354" class="py-name"><a title="lxml.etree._Comment.tag
3969 lxml.etree._Element.tag
3970 lxml.etree._Entity.tag
3971 lxml.etree._ProcessingInstruction.tag
3972 lxml.etree._ReadOnlyProxy.tag
3973 lxml.tests.test_xpathevaluator.tag
3974 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1354', 'tag', 'link-73');">tag</a></tt><tt class="py-op">,</tt> <tt id="link-1355" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-1355', 'Entity', 'link-1343');">Entity</a></tt><tt class="py-op">)</tt> </tt>
3975 <a name="L1222"></a><tt class="py-lineno">1222</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1356" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1356', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1357" class="py-name"><a title="lxml.etree.QName.text
3976 lxml.etree._AppendOnlyElementProxy.text
3977 lxml.etree._Element.text
3978 lxml.etree._Entity.text
3979 lxml.etree._ModifyContentOnlyProxy.text
3980 lxml.etree._ReadOnlyEntityProxy.text
3981 lxml.etree._ReadOnlyProxy.text
3982 lxml.etree.__ContentOnlyElement.text
3983 lxml.objectify.ObjectifiedElement.text
3984 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-1357', 'text', 'link-194');">text</a></tt><tt class="py-op">,</tt> <tt class="py-string">"&myentity;"</tt><tt class="py-op">)</tt> </tt>
3985 <a name="L1223"></a><tt class="py-lineno">1223</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1358" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1358', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1359" class="py-name"><a title="lxml.etree._Element.tail
3986 lxml.etree._ReadOnlyProxy.tail
3987 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-1359', 'tail', 'link-850');">tail</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
3988 <a name="L1224"></a><tt class="py-lineno">1224</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1360" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1360', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1361" class="py-name"><a title="lxml.etree._Entity.name
3989 lxml.etree._ModifyContentOnlyEntityProxy.name
3990 lxml.etree._ReadOnlyEntityProxy.name
3991 lxml.html.InputMixin.name
3992 lxml.objectify.PyType.name" class="py-name" href="#" onclick="return doclink('link-1361', 'name', 'link-803');">name</a></tt><tt class="py-op">,</tt> <tt class="py-string">"myentity"</tt><tt class="py-op">)</tt> </tt>
3993 <a name="L1225"></a><tt class="py-lineno">1225</tt> <tt class="py-line"> </tt>
3994 <a name="L1226"></a><tt class="py-lineno">1226</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1362" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1362', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<doc>&myentity;</doc>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
3995 <a name="L1227"></a><tt class="py-lineno">1227</tt> <tt class="py-line"> <tt id="link-1363" class="py-name"><a title="lxml.etree.XSLT.tostring
3997 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-1363', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt id="link-1364" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1364', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
3998 </div><a name="L1228"></a><tt class="py-lineno">1228</tt> <tt class="py-line"> </tt>
3999 <a name="ETreeOnlyTestCase.test_entity_restructure"></a><div id="ETreeOnlyTestCase.test_entity_restructure-def"><a name="L1229"></a><tt class="py-lineno">1229</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_entity_restructure-toggle" onclick="return toggle('ETreeOnlyTestCase.test_entity_restructure');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_entity_restructure">test_entity_restructure</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4000 </div><div id="ETreeOnlyTestCase.test_entity_restructure-collapsed" style="display:none;" pad="++++" indent="++++++++++++++++"></div><div id="ETreeOnlyTestCase.test_entity_restructure-expanded"><a name="L1230"></a><tt class="py-lineno">1230</tt> <tt class="py-line"> <tt id="link-1365" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1365', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-1366" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1366', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'''<!DOCTYPE root [ <!ENTITY nbsp "&#160;"> ]></tt> </tt>
4001 <a name="L1231"></a><tt class="py-lineno">1231</tt> <tt class="py-line"><tt class="py-string"> <root></tt> </tt>
4002 <a name="L1232"></a><tt class="py-lineno">1232</tt> <tt class="py-line"><tt class="py-string"> <child1/></tt> </tt>
4003 <a name="L1233"></a><tt class="py-lineno">1233</tt> <tt class="py-line"><tt class="py-string"> <child2/></tt> </tt>
4004 <a name="L1234"></a><tt class="py-lineno">1234</tt> <tt class="py-line"><tt class="py-string"> <child3>&nbsp;</child3></tt> </tt>
4005 <a name="L1235"></a><tt class="py-lineno">1235</tt> <tt class="py-line"><tt class="py-string"> </root>'''</tt><tt class="py-op">)</tt> </tt>
4006 <a name="L1236"></a><tt class="py-lineno">1236</tt> <tt class="py-line"> </tt>
4007 <a name="L1237"></a><tt class="py-lineno">1237</tt> <tt class="py-line"> <tt id="link-1367" class="py-name"><a title="lxml.etree._ElementTree.parser
4008 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1367', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1368" class="py-name"><a title="lxml.etree
4009 lxml.sax.ElementTreeContentHandler.etree
4010 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4011 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4012 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1368', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1369" class="py-name"><a title="lxml.etree.XMLParser
4013 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-1369', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt class="py-name">resolve_entities</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
4014 <a name="L1238"></a><tt class="py-lineno">1238</tt> <tt class="py-line"> <tt id="link-1370" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1370', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-1371" class="py-name"><a title="lxml.etree
4015 lxml.sax.ElementTreeContentHandler.etree
4016 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4017 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4018 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1371', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1372" class="py-name"><a title="lxml.etree.fromstring
4019 lxml.html.fromstring
4020 lxml.html.html5parser.fromstring
4021 lxml.html.soupparser.fromstring
4022 lxml.objectify.fromstring" class="py-name" href="#" onclick="return doclink('link-1372', 'fromstring', 'link-737');">fromstring</a></tt><tt class="py-op">(</tt><tt id="link-1373" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1373', 'xml', 'link-256');">xml</a></tt><tt class="py-op">,</tt> <tt id="link-1374" class="py-name"><a title="lxml.etree._ElementTree.parser
4023 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1374', 'parser', 'link-748');">parser</a></tt><tt class="py-op">)</tt> </tt>
4024 <a name="L1239"></a><tt class="py-lineno">1239</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt> <tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-1375" class="py-name"><a title="lxml.etree._Comment.tag
4025 lxml.etree._Element.tag
4026 lxml.etree._Entity.tag
4027 lxml.etree._ProcessingInstruction.tag
4028 lxml.etree._ReadOnlyProxy.tag
4029 lxml.tests.test_xpathevaluator.tag
4030 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1375', 'tag', 'link-73');">tag</a></tt> <tt class="py-keyword">for</tt> <tt class="py-name">el</tt> <tt class="py-keyword">in</tt> <tt id="link-1376" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1376', 'root', 'link-220');">root</a></tt> <tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
4031 <a name="L1240"></a><tt class="py-lineno">1240</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-string">'child1'</tt><tt class="py-op">,</tt> <tt class="py-string">'child2'</tt><tt class="py-op">,</tt> <tt class="py-string">'child3'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
4032 <a name="L1241"></a><tt class="py-lineno">1241</tt> <tt class="py-line"> </tt>
4033 <a name="L1242"></a><tt class="py-lineno">1242</tt> <tt class="py-line"> <tt id="link-1377" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1377', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-1378" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1378', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
4034 <a name="L1243"></a><tt class="py-lineno">1243</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt> <tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-1379" class="py-name"><a title="lxml.etree._Comment.tag
4035 lxml.etree._Element.tag
4036 lxml.etree._Entity.tag
4037 lxml.etree._ProcessingInstruction.tag
4038 lxml.etree._ReadOnlyProxy.tag
4039 lxml.tests.test_xpathevaluator.tag
4040 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1379', 'tag', 'link-73');">tag</a></tt> <tt class="py-keyword">for</tt> <tt class="py-name">el</tt> <tt class="py-keyword">in</tt> <tt id="link-1380" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1380', 'root', 'link-220');">root</a></tt> <tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
4041 <a name="L1244"></a><tt class="py-lineno">1244</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-string">'child3'</tt><tt class="py-op">,</tt> <tt class="py-string">'child2'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
4042 <a name="L1245"></a><tt class="py-lineno">1245</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1381" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1381', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1382" class="py-name"><a title="lxml.etree.QName.text
4043 lxml.etree._AppendOnlyElementProxy.text
4044 lxml.etree._Element.text
4045 lxml.etree._Entity.text
4046 lxml.etree._ModifyContentOnlyProxy.text
4047 lxml.etree._ReadOnlyEntityProxy.text
4048 lxml.etree._ReadOnlyProxy.text
4049 lxml.etree.__ContentOnlyElement.text
4050 lxml.objectify.ObjectifiedElement.text
4051 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-1382', 'text', 'link-194');">text</a></tt><tt class="py-op">,</tt> <tt class="py-string">'&nbsp;'</tt><tt class="py-op">)</tt> </tt>
4052 <a name="L1246"></a><tt class="py-lineno">1246</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1383" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1383', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1384" class="py-name"><a title="lxml.etree._Entity.name
4053 lxml.etree._ModifyContentOnlyEntityProxy.name
4054 lxml.etree._ReadOnlyEntityProxy.name
4055 lxml.html.InputMixin.name
4056 lxml.objectify.PyType.name" class="py-name" href="#" onclick="return doclink('link-1384', 'name', 'link-803');">name</a></tt><tt class="py-op">,</tt> <tt class="py-string">'nbsp'</tt><tt class="py-op">)</tt> </tt>
4057 </div><a name="L1247"></a><tt class="py-lineno">1247</tt> <tt class="py-line"> </tt>
4058 <a name="ETreeOnlyTestCase.test_entity_append"></a><div id="ETreeOnlyTestCase.test_entity_append-def"><a name="L1248"></a><tt class="py-lineno">1248</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_entity_append-toggle" onclick="return toggle('ETreeOnlyTestCase.test_entity_append');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_entity_append">test_entity_append</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4059 </div><div id="ETreeOnlyTestCase.test_entity_append-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_entity_append-expanded"><a name="L1249"></a><tt class="py-lineno">1249</tt> <tt class="py-line"> <tt id="link-1385" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-1385', 'Entity', 'link-1343');">Entity</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1386" class="py-name"><a title="lxml.etree
4060 lxml.sax.ElementTreeContentHandler.etree
4061 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4062 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4063 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1386', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1387" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-1387', 'Entity', 'link-1343');">Entity</a></tt> </tt>
4064 <a name="L1250"></a><tt class="py-lineno">1250</tt> <tt class="py-line"> <tt id="link-1388" class="py-name"><a title="lxml.cssselect.Element
4067 lxml.objectify.Element
4068 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4069 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1388', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1389" class="py-name"><a title="lxml.etree
4070 lxml.sax.ElementTreeContentHandler.etree
4071 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4072 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4073 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1389', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1390" class="py-name"><a title="lxml.cssselect.Element
4076 lxml.objectify.Element
4077 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4078 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1390', 'Element', 'link-69');">Element</a></tt> </tt>
4079 <a name="L1251"></a><tt class="py-lineno">1251</tt> <tt class="py-line"> <tt id="link-1391" class="py-name"><a title="lxml.etree.XSLT.tostring
4081 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-1391', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1392" class="py-name"><a title="lxml.etree
4082 lxml.sax.ElementTreeContentHandler.etree
4083 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4084 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4085 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1392', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1393" class="py-name"><a title="lxml.etree.XSLT.tostring
4087 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-1393', 'tostring', 'link-597');">tostring</a></tt> </tt>
4088 <a name="L1252"></a><tt class="py-lineno">1252</tt> <tt class="py-line"> </tt>
4089 <a name="L1253"></a><tt class="py-lineno">1253</tt> <tt class="py-line"> <tt id="link-1394" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1394', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-1395" class="py-name"><a title="lxml.cssselect.Element
4092 lxml.objectify.Element
4093 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4094 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1395', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">"root"</tt><tt class="py-op">)</tt> </tt>
4095 <a name="L1254"></a><tt class="py-lineno">1254</tt> <tt class="py-line"> <tt id="link-1396" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1396', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1397" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
4096 lxml.etree._Element.append
4097 lxml.etree._OpaqueDocumentWrapper.append
4098 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1397', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt> <tt id="link-1398" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-1398', 'Entity', 'link-1343');">Entity</a></tt><tt class="py-op">(</tt><tt class="py-string">"test"</tt><tt class="py-op">)</tt> <tt class="py-op">)</tt> </tt>
4099 <a name="L1255"></a><tt class="py-lineno">1255</tt> <tt class="py-line"> </tt>
4100 <a name="L1256"></a><tt class="py-lineno">1256</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1399" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1399', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1400" class="py-name"><a title="lxml.etree._Comment.tag
4101 lxml.etree._Element.tag
4102 lxml.etree._Entity.tag
4103 lxml.etree._ProcessingInstruction.tag
4104 lxml.etree._ReadOnlyProxy.tag
4105 lxml.tests.test_xpathevaluator.tag
4106 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1400', 'tag', 'link-73');">tag</a></tt><tt class="py-op">,</tt> <tt id="link-1401" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-1401', 'Entity', 'link-1343');">Entity</a></tt><tt class="py-op">)</tt> </tt>
4107 <a name="L1257"></a><tt class="py-lineno">1257</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1402" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1402', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1403" class="py-name"><a title="lxml.etree.QName.text
4108 lxml.etree._AppendOnlyElementProxy.text
4109 lxml.etree._Element.text
4110 lxml.etree._Entity.text
4111 lxml.etree._ModifyContentOnlyProxy.text
4112 lxml.etree._ReadOnlyEntityProxy.text
4113 lxml.etree._ReadOnlyProxy.text
4114 lxml.etree.__ContentOnlyElement.text
4115 lxml.objectify.ObjectifiedElement.text
4116 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-1403', 'text', 'link-194');">text</a></tt><tt class="py-op">,</tt> <tt class="py-string">"&test;"</tt><tt class="py-op">)</tt> </tt>
4117 <a name="L1258"></a><tt class="py-lineno">1258</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1404" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1404', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1405" class="py-name"><a title="lxml.etree._Element.tail
4118 lxml.etree._ReadOnlyProxy.tail
4119 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-1405', 'tail', 'link-850');">tail</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
4120 <a name="L1259"></a><tt class="py-lineno">1259</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1406" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1406', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1407" class="py-name"><a title="lxml.etree._Entity.name
4121 lxml.etree._ModifyContentOnlyEntityProxy.name
4122 lxml.etree._ReadOnlyEntityProxy.name
4123 lxml.html.InputMixin.name
4124 lxml.objectify.PyType.name" class="py-name" href="#" onclick="return doclink('link-1407', 'name', 'link-803');">name</a></tt><tt class="py-op">,</tt> <tt class="py-string">"test"</tt><tt class="py-op">)</tt> </tt>
4125 <a name="L1260"></a><tt class="py-lineno">1260</tt> <tt class="py-line"> </tt>
4126 <a name="L1261"></a><tt class="py-lineno">1261</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1408" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1408', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root>&test;</root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
4127 <a name="L1262"></a><tt class="py-lineno">1262</tt> <tt class="py-line"> <tt id="link-1409" class="py-name"><a title="lxml.etree.XSLT.tostring
4129 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-1409', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt id="link-1410" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1410', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4130 </div><a name="L1263"></a><tt class="py-lineno">1263</tt> <tt class="py-line"> </tt>
4131 <a name="ETreeOnlyTestCase.test_entity_values"></a><div id="ETreeOnlyTestCase.test_entity_values-def"><a name="L1264"></a><tt class="py-lineno">1264</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_entity_values-toggle" onclick="return toggle('ETreeOnlyTestCase.test_entity_values');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_entity_values">test_entity_values</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4132 </div><div id="ETreeOnlyTestCase.test_entity_values-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_entity_values-expanded"><a name="L1265"></a><tt class="py-lineno">1265</tt> <tt class="py-line"> <tt id="link-1411" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-1411', 'Entity', 'link-1343');">Entity</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1412" class="py-name"><a title="lxml.etree
4133 lxml.sax.ElementTreeContentHandler.etree
4134 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4135 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4136 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1412', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1413" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-1413', 'Entity', 'link-1343');">Entity</a></tt> </tt>
4137 <a name="L1266"></a><tt class="py-lineno">1266</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1414" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-1414', 'Entity', 'link-1343');">Entity</a></tt><tt class="py-op">(</tt><tt class="py-string">"test"</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1415" class="py-name"><a title="lxml.etree.QName.text
4138 lxml.etree._AppendOnlyElementProxy.text
4139 lxml.etree._Element.text
4140 lxml.etree._Entity.text
4141 lxml.etree._ModifyContentOnlyProxy.text
4142 lxml.etree._ReadOnlyEntityProxy.text
4143 lxml.etree._ReadOnlyProxy.text
4144 lxml.etree.__ContentOnlyElement.text
4145 lxml.objectify.ObjectifiedElement.text
4146 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-1415', 'text', 'link-194');">text</a></tt><tt class="py-op">,</tt> <tt class="py-string">'&test;'</tt><tt class="py-op">)</tt> </tt>
4147 <a name="L1267"></a><tt class="py-lineno">1267</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1416" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-1416', 'Entity', 'link-1343');">Entity</a></tt><tt class="py-op">(</tt><tt class="py-string">"#17683"</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1417" class="py-name"><a title="lxml.etree.QName.text
4148 lxml.etree._AppendOnlyElementProxy.text
4149 lxml.etree._Element.text
4150 lxml.etree._Entity.text
4151 lxml.etree._ModifyContentOnlyProxy.text
4152 lxml.etree._ReadOnlyEntityProxy.text
4153 lxml.etree._ReadOnlyProxy.text
4154 lxml.etree.__ContentOnlyElement.text
4155 lxml.objectify.ObjectifiedElement.text
4156 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-1417', 'text', 'link-194');">text</a></tt><tt class="py-op">,</tt> <tt class="py-string">'&#17683;'</tt><tt class="py-op">)</tt> </tt>
4157 <a name="L1268"></a><tt class="py-lineno">1268</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1418" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-1418', 'Entity', 'link-1343');">Entity</a></tt><tt class="py-op">(</tt><tt class="py-string">"#x1768"</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1419" class="py-name"><a title="lxml.etree.QName.text
4158 lxml.etree._AppendOnlyElementProxy.text
4159 lxml.etree._Element.text
4160 lxml.etree._Entity.text
4161 lxml.etree._ModifyContentOnlyProxy.text
4162 lxml.etree._ReadOnlyEntityProxy.text
4163 lxml.etree._ReadOnlyProxy.text
4164 lxml.etree.__ContentOnlyElement.text
4165 lxml.objectify.ObjectifiedElement.text
4166 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-1419', 'text', 'link-194');">text</a></tt><tt class="py-op">,</tt> <tt class="py-string">'&#x1768;'</tt><tt class="py-op">)</tt> </tt>
4167 <a name="L1269"></a><tt class="py-lineno">1269</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1420" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-1420', 'Entity', 'link-1343');">Entity</a></tt><tt class="py-op">(</tt><tt class="py-string">"#x98AF"</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1421" class="py-name"><a title="lxml.etree.QName.text
4168 lxml.etree._AppendOnlyElementProxy.text
4169 lxml.etree._Element.text
4170 lxml.etree._Entity.text
4171 lxml.etree._ModifyContentOnlyProxy.text
4172 lxml.etree._ReadOnlyEntityProxy.text
4173 lxml.etree._ReadOnlyProxy.text
4174 lxml.etree.__ContentOnlyElement.text
4175 lxml.objectify.ObjectifiedElement.text
4176 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-1421', 'text', 'link-194');">text</a></tt><tt class="py-op">,</tt> <tt class="py-string">'&#x98AF;'</tt><tt class="py-op">)</tt> </tt>
4177 </div><a name="L1270"></a><tt class="py-lineno">1270</tt> <tt class="py-line"> </tt>
4178 <a name="ETreeOnlyTestCase.test_entity_error"></a><div id="ETreeOnlyTestCase.test_entity_error-def"><a name="L1271"></a><tt class="py-lineno">1271</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_entity_error-toggle" onclick="return toggle('ETreeOnlyTestCase.test_entity_error');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_entity_error">test_entity_error</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4179 </div><div id="ETreeOnlyTestCase.test_entity_error-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_entity_error-expanded"><a name="L1272"></a><tt class="py-lineno">1272</tt> <tt class="py-line"> <tt id="link-1422" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-1422', 'Entity', 'link-1343');">Entity</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1423" class="py-name"><a title="lxml.etree
4180 lxml.sax.ElementTreeContentHandler.etree
4181 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4182 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4183 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1423', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1424" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-1424', 'Entity', 'link-1343');">Entity</a></tt> </tt>
4184 <a name="L1273"></a><tt class="py-lineno">1273</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-1425" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-1425', 'Entity', 'link-1343');">Entity</a></tt><tt class="py-op">,</tt> <tt class="py-string">'a b c'</tt><tt class="py-op">)</tt> </tt>
4185 <a name="L1274"></a><tt class="py-lineno">1274</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-1426" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-1426', 'Entity', 'link-1343');">Entity</a></tt><tt class="py-op">,</tt> <tt class="py-string">'a,b'</tt><tt class="py-op">)</tt> </tt>
4186 <a name="L1275"></a><tt class="py-lineno">1275</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-1427" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-1427', 'Entity', 'link-1343');">Entity</a></tt><tt class="py-op">,</tt> <tt class="py-string">'a\0b'</tt><tt class="py-op">)</tt> </tt>
4187 <a name="L1276"></a><tt class="py-lineno">1276</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-1428" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-1428', 'Entity', 'link-1343');">Entity</a></tt><tt class="py-op">,</tt> <tt class="py-string">'#abc'</tt><tt class="py-op">)</tt> </tt>
4188 <a name="L1277"></a><tt class="py-lineno">1277</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-1429" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-1429', 'Entity', 'link-1343');">Entity</a></tt><tt class="py-op">,</tt> <tt class="py-string">'#xxyz'</tt><tt class="py-op">)</tt> </tt>
4189 </div><a name="L1278"></a><tt class="py-lineno">1278</tt> <tt class="py-line"> </tt>
4190 <a name="ETreeOnlyTestCase.test_cdata"></a><div id="ETreeOnlyTestCase.test_cdata-def"><a name="L1279"></a><tt class="py-lineno">1279</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_cdata-toggle" onclick="return toggle('ETreeOnlyTestCase.test_cdata');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_cdata">test_cdata</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4191 </div><div id="ETreeOnlyTestCase.test_cdata-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_cdata-expanded"><a name="L1280"></a><tt class="py-lineno">1280</tt> <tt class="py-line"> <tt id="link-1430" class="py-name" targets="Class lxml.etree.CDATA=lxml.etree.CDATA-class.html"><a title="lxml.etree.CDATA" class="py-name" href="#" onclick="return doclink('link-1430', 'CDATA', 'link-1430');">CDATA</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1431" class="py-name"><a title="lxml.etree
4192 lxml.sax.ElementTreeContentHandler.etree
4193 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4194 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4195 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1431', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1432" class="py-name"><a title="lxml.etree.CDATA" class="py-name" href="#" onclick="return doclink('link-1432', 'CDATA', 'link-1430');">CDATA</a></tt> </tt>
4196 <a name="L1281"></a><tt class="py-lineno">1281</tt> <tt class="py-line"> <tt id="link-1433" class="py-name"><a title="lxml.cssselect.Element
4199 lxml.objectify.Element
4200 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4201 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1433', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1434" class="py-name"><a title="lxml.etree
4202 lxml.sax.ElementTreeContentHandler.etree
4203 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4204 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4205 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1434', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1435" class="py-name"><a title="lxml.cssselect.Element
4208 lxml.objectify.Element
4209 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4210 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1435', 'Element', 'link-69');">Element</a></tt> </tt>
4211 <a name="L1282"></a><tt class="py-lineno">1282</tt> <tt class="py-line"> <tt id="link-1436" class="py-name"><a title="lxml.etree.XSLT.tostring
4213 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-1436', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1437" class="py-name"><a title="lxml.etree
4214 lxml.sax.ElementTreeContentHandler.etree
4215 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4216 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4217 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1437', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1438" class="py-name"><a title="lxml.etree.XSLT.tostring
4219 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-1438', 'tostring', 'link-597');">tostring</a></tt> </tt>
4220 <a name="L1283"></a><tt class="py-lineno">1283</tt> <tt class="py-line"> </tt>
4221 <a name="L1284"></a><tt class="py-lineno">1284</tt> <tt class="py-line"> <tt id="link-1439" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1439', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-1440" class="py-name"><a title="lxml.cssselect.Element
4224 lxml.objectify.Element
4225 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4226 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1440', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">"root"</tt><tt class="py-op">)</tt> </tt>
4227 <a name="L1285"></a><tt class="py-lineno">1285</tt> <tt class="py-line"> <tt id="link-1441" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1441', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1442" class="py-name"><a title="lxml.etree.QName.text
4228 lxml.etree._AppendOnlyElementProxy.text
4229 lxml.etree._Element.text
4230 lxml.etree._Entity.text
4231 lxml.etree._ModifyContentOnlyProxy.text
4232 lxml.etree._ReadOnlyEntityProxy.text
4233 lxml.etree._ReadOnlyProxy.text
4234 lxml.etree.__ContentOnlyElement.text
4235 lxml.objectify.ObjectifiedElement.text
4236 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-1442', 'text', 'link-194');">text</a></tt> <tt class="py-op">=</tt> <tt id="link-1443" class="py-name"><a title="lxml.etree.CDATA" class="py-name" href="#" onclick="return doclink('link-1443', 'CDATA', 'link-1430');">CDATA</a></tt><tt class="py-op">(</tt><tt class="py-string">'test'</tt><tt class="py-op">)</tt> </tt>
4237 <a name="L1286"></a><tt class="py-lineno">1286</tt> <tt class="py-line"> </tt>
4238 <a name="L1287"></a><tt class="py-lineno">1287</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-string">'test'</tt><tt class="py-op">,</tt> </tt>
4239 <a name="L1288"></a><tt class="py-lineno">1288</tt> <tt class="py-line"> <tt id="link-1444" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1444', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1445" class="py-name"><a title="lxml.etree.QName.text
4240 lxml.etree._AppendOnlyElementProxy.text
4241 lxml.etree._Element.text
4242 lxml.etree._Entity.text
4243 lxml.etree._ModifyContentOnlyProxy.text
4244 lxml.etree._ReadOnlyEntityProxy.text
4245 lxml.etree._ReadOnlyProxy.text
4246 lxml.etree.__ContentOnlyElement.text
4247 lxml.objectify.ObjectifiedElement.text
4248 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-1445', 'text', 'link-194');">text</a></tt><tt class="py-op">)</tt> </tt>
4249 <a name="L1289"></a><tt class="py-lineno">1289</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1446" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1446', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root><![CDATA[test]]></root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
4250 <a name="L1290"></a><tt class="py-lineno">1290</tt> <tt class="py-line"> <tt id="link-1447" class="py-name"><a title="lxml.etree.XSLT.tostring
4252 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-1447', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt id="link-1448" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1448', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4253 </div><a name="L1291"></a><tt class="py-lineno">1291</tt> <tt class="py-line"> </tt>
4254 <a name="ETreeOnlyTestCase.test_cdata_type"></a><div id="ETreeOnlyTestCase.test_cdata_type-def"><a name="L1292"></a><tt class="py-lineno">1292</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_cdata_type-toggle" onclick="return toggle('ETreeOnlyTestCase.test_cdata_type');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_cdata_type">test_cdata_type</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4255 </div><div id="ETreeOnlyTestCase.test_cdata_type-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_cdata_type-expanded"><a name="L1293"></a><tt class="py-lineno">1293</tt> <tt class="py-line"> <tt id="link-1449" class="py-name"><a title="lxml.etree.CDATA" class="py-name" href="#" onclick="return doclink('link-1449', 'CDATA', 'link-1430');">CDATA</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1450" class="py-name"><a title="lxml.etree
4256 lxml.sax.ElementTreeContentHandler.etree
4257 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4258 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4259 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1450', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1451" class="py-name"><a title="lxml.etree.CDATA" class="py-name" href="#" onclick="return doclink('link-1451', 'CDATA', 'link-1430');">CDATA</a></tt> </tt>
4260 <a name="L1294"></a><tt class="py-lineno">1294</tt> <tt class="py-line"> <tt id="link-1452" class="py-name"><a title="lxml.cssselect.Element
4263 lxml.objectify.Element
4264 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4265 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1452', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1453" class="py-name"><a title="lxml.etree
4266 lxml.sax.ElementTreeContentHandler.etree
4267 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4268 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4269 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1453', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1454" class="py-name"><a title="lxml.cssselect.Element
4272 lxml.objectify.Element
4273 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4274 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1454', 'Element', 'link-69');">Element</a></tt> </tt>
4275 <a name="L1295"></a><tt class="py-lineno">1295</tt> <tt class="py-line"> <tt id="link-1455" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1455', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-1456" class="py-name"><a title="lxml.cssselect.Element
4278 lxml.objectify.Element
4279 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4280 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1456', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">"root"</tt><tt class="py-op">)</tt> </tt>
4281 <a name="L1296"></a><tt class="py-lineno">1296</tt> <tt class="py-line"> </tt>
4282 <a name="L1297"></a><tt class="py-lineno">1297</tt> <tt class="py-line"> <tt id="link-1457" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1457', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1458" class="py-name"><a title="lxml.etree.QName.text
4283 lxml.etree._AppendOnlyElementProxy.text
4284 lxml.etree._Element.text
4285 lxml.etree._Entity.text
4286 lxml.etree._ModifyContentOnlyProxy.text
4287 lxml.etree._ReadOnlyEntityProxy.text
4288 lxml.etree._ReadOnlyProxy.text
4289 lxml.etree.__ContentOnlyElement.text
4290 lxml.objectify.ObjectifiedElement.text
4291 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-1458', 'text', 'link-194');">text</a></tt> <tt class="py-op">=</tt> <tt id="link-1459" class="py-name"><a title="lxml.etree.CDATA" class="py-name" href="#" onclick="return doclink('link-1459', 'CDATA', 'link-1430');">CDATA</a></tt><tt class="py-op">(</tt><tt class="py-string">"test"</tt><tt class="py-op">)</tt> </tt>
4292 <a name="L1298"></a><tt class="py-lineno">1298</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-string">'test'</tt><tt class="py-op">,</tt> <tt id="link-1460" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1460', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1461" class="py-name"><a title="lxml.etree.QName.text
4293 lxml.etree._AppendOnlyElementProxy.text
4294 lxml.etree._Element.text
4295 lxml.etree._Entity.text
4296 lxml.etree._ModifyContentOnlyProxy.text
4297 lxml.etree._ReadOnlyEntityProxy.text
4298 lxml.etree._ReadOnlyProxy.text
4299 lxml.etree.__ContentOnlyElement.text
4300 lxml.objectify.ObjectifiedElement.text
4301 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-1461', 'text', 'link-194');">text</a></tt><tt class="py-op">)</tt> </tt>
4302 <a name="L1299"></a><tt class="py-lineno">1299</tt> <tt class="py-line"> </tt>
4303 <a name="L1300"></a><tt class="py-lineno">1300</tt> <tt class="py-line"> <tt id="link-1462" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1462', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1463" class="py-name"><a title="lxml.etree.QName.text
4304 lxml.etree._AppendOnlyElementProxy.text
4305 lxml.etree._Element.text
4306 lxml.etree._Entity.text
4307 lxml.etree._ModifyContentOnlyProxy.text
4308 lxml.etree._ReadOnlyEntityProxy.text
4309 lxml.etree._ReadOnlyProxy.text
4310 lxml.etree.__ContentOnlyElement.text
4311 lxml.objectify.ObjectifiedElement.text
4312 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-1463', 'text', 'link-194');">text</a></tt> <tt class="py-op">=</tt> <tt id="link-1464" class="py-name"><a title="lxml.etree.CDATA" class="py-name" href="#" onclick="return doclink('link-1464', 'CDATA', 'link-1430');">CDATA</a></tt><tt class="py-op">(</tt><tt id="link-1465" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-1465', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">"test"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4313 <a name="L1301"></a><tt class="py-lineno">1301</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-string">'test'</tt><tt class="py-op">,</tt> <tt id="link-1466" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1466', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1467" class="py-name"><a title="lxml.etree.QName.text
4314 lxml.etree._AppendOnlyElementProxy.text
4315 lxml.etree._Element.text
4316 lxml.etree._Entity.text
4317 lxml.etree._ModifyContentOnlyProxy.text
4318 lxml.etree._ReadOnlyEntityProxy.text
4319 lxml.etree._ReadOnlyProxy.text
4320 lxml.etree.__ContentOnlyElement.text
4321 lxml.objectify.ObjectifiedElement.text
4322 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-1467', 'text', 'link-194');">text</a></tt><tt class="py-op">)</tt> </tt>
4323 <a name="L1302"></a><tt class="py-lineno">1302</tt> <tt class="py-line"> </tt>
4324 <a name="L1303"></a><tt class="py-lineno">1303</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">TypeError</tt><tt class="py-op">,</tt> <tt id="link-1468" class="py-name"><a title="lxml.etree.CDATA" class="py-name" href="#" onclick="return doclink('link-1468', 'CDATA', 'link-1430');">CDATA</a></tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
4325 </div><a name="L1304"></a><tt class="py-lineno">1304</tt> <tt class="py-line"> </tt>
4326 <a name="ETreeOnlyTestCase.test_cdata_errors"></a><div id="ETreeOnlyTestCase.test_cdata_errors-def"><a name="L1305"></a><tt class="py-lineno">1305</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_cdata_errors-toggle" onclick="return toggle('ETreeOnlyTestCase.test_cdata_errors');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_cdata_errors">test_cdata_errors</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4327 </div><div id="ETreeOnlyTestCase.test_cdata_errors-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_cdata_errors-expanded"><a name="L1306"></a><tt class="py-lineno">1306</tt> <tt class="py-line"> <tt id="link-1469" class="py-name"><a title="lxml.etree.CDATA" class="py-name" href="#" onclick="return doclink('link-1469', 'CDATA', 'link-1430');">CDATA</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1470" class="py-name"><a title="lxml.etree
4328 lxml.sax.ElementTreeContentHandler.etree
4329 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4330 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4331 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1470', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1471" class="py-name"><a title="lxml.etree.CDATA" class="py-name" href="#" onclick="return doclink('link-1471', 'CDATA', 'link-1430');">CDATA</a></tt> </tt>
4332 <a name="L1307"></a><tt class="py-lineno">1307</tt> <tt class="py-line"> <tt id="link-1472" class="py-name"><a title="lxml.cssselect.Element
4335 lxml.objectify.Element
4336 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4337 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1472', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1473" class="py-name"><a title="lxml.etree
4338 lxml.sax.ElementTreeContentHandler.etree
4339 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4340 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4341 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1473', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1474" class="py-name"><a title="lxml.cssselect.Element
4344 lxml.objectify.Element
4345 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4346 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1474', 'Element', 'link-69');">Element</a></tt> </tt>
4347 <a name="L1308"></a><tt class="py-lineno">1308</tt> <tt class="py-line"> </tt>
4348 <a name="L1309"></a><tt class="py-lineno">1309</tt> <tt class="py-line"> <tt id="link-1475" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1475', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-1476" class="py-name"><a title="lxml.cssselect.Element
4351 lxml.objectify.Element
4352 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4353 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1476', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">"root"</tt><tt class="py-op">)</tt> </tt>
4354 <a name="L1310"></a><tt class="py-lineno">1310</tt> <tt class="py-line"> <tt class="py-name">cdata</tt> <tt class="py-op">=</tt> <tt id="link-1477" class="py-name"><a title="lxml.etree.CDATA" class="py-name" href="#" onclick="return doclink('link-1477', 'CDATA', 'link-1430');">CDATA</a></tt><tt class="py-op">(</tt><tt class="py-string">'test'</tt><tt class="py-op">)</tt> </tt>
4355 <a name="L1311"></a><tt class="py-lineno">1311</tt> <tt class="py-line"> </tt>
4356 <a name="L1312"></a><tt class="py-lineno">1312</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">TypeError</tt><tt class="py-op">,</tt> </tt>
4357 <a name="L1313"></a><tt class="py-lineno">1313</tt> <tt class="py-line"> <tt id="link-1478" class="py-name"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-1478', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt id="link-1479" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1479', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'tail'</tt><tt class="py-op">,</tt> <tt class="py-name">cdata</tt><tt class="py-op">)</tt> </tt>
4358 <a name="L1314"></a><tt class="py-lineno">1314</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">TypeError</tt><tt class="py-op">,</tt> </tt>
4359 <a name="L1315"></a><tt class="py-lineno">1315</tt> <tt class="py-line"> <tt id="link-1480" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1480', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1481" class="py-name"><a title="lxml.etree._Element.set
4360 lxml.etree._XSLTProcessingInstruction.set
4361 lxml.etree.__ContentOnlyElement.set" class="py-name" href="#" onclick="return doclink('link-1481', 'set', 'link-241');">set</a></tt><tt class="py-op">,</tt> <tt class="py-string">'attr'</tt><tt class="py-op">,</tt> <tt class="py-name">cdata</tt><tt class="py-op">)</tt> </tt>
4362 <a name="L1316"></a><tt class="py-lineno">1316</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">TypeError</tt><tt class="py-op">,</tt> </tt>
4363 <a name="L1317"></a><tt class="py-lineno">1317</tt> <tt class="py-line"> <tt class="py-name">operator</tt><tt class="py-op">.</tt><tt class="py-name">setitem</tt><tt class="py-op">,</tt> <tt id="link-1482" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1482', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1483" class="py-name"><a title="lxml.etree._Element.attrib
4364 lxml.etree._ProcessingInstruction.attrib
4365 lxml.etree._ReadOnlyElementProxy.attrib
4366 lxml.etree.__ContentOnlyElement.attrib
4367 xml.etree.ElementTree.Element.attrib" class="py-name" href="#" onclick="return doclink('link-1483', 'attrib', 'link-224');">attrib</a></tt><tt class="py-op">,</tt> <tt class="py-string">'attr'</tt><tt class="py-op">,</tt> <tt class="py-name">cdata</tt><tt class="py-op">)</tt> </tt>
4368 </div><a name="L1318"></a><tt class="py-lineno">1318</tt> <tt class="py-line"> </tt>
4369 <a name="ETreeOnlyTestCase.test_cdata_parser"></a><div id="ETreeOnlyTestCase.test_cdata_parser-def"><a name="L1319"></a><tt class="py-lineno">1319</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_cdata_parser-toggle" onclick="return toggle('ETreeOnlyTestCase.test_cdata_parser');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_cdata_parser">test_cdata_parser</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4370 </div><div id="ETreeOnlyTestCase.test_cdata_parser-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_cdata_parser-expanded"><a name="L1320"></a><tt class="py-lineno">1320</tt> <tt class="py-line"> <tt id="link-1484" class="py-name"><a title="lxml.etree.XSLT.tostring
4372 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-1484', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1485" class="py-name"><a title="lxml.etree
4373 lxml.sax.ElementTreeContentHandler.etree
4374 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4375 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4376 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1485', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1486" class="py-name"><a title="lxml.etree.XSLT.tostring
4378 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-1486', 'tostring', 'link-597');">tostring</a></tt> </tt>
4379 <a name="L1321"></a><tt class="py-lineno">1321</tt> <tt class="py-line"> <tt id="link-1487" class="py-name"><a title="lxml.etree._ElementTree.parser
4380 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1487', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1488" class="py-name"><a title="lxml.etree
4381 lxml.sax.ElementTreeContentHandler.etree
4382 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4383 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4384 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1488', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1489" class="py-name"><a title="lxml.etree.XMLParser
4385 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-1489', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt class="py-name">strip_cdata</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
4386 <a name="L1322"></a><tt class="py-lineno">1322</tt> <tt class="py-line"> <tt id="link-1490" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1490', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1491" class="py-name"><a title="lxml.etree
4387 lxml.sax.ElementTreeContentHandler.etree
4388 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4389 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4390 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1491', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1492" class="py-name"><a title="lxml.etree.XML
4392 lxml.tests.test_objectify.ObjectifyTestCase.XML
4393 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1492', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-1493" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1493', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root><![CDATA[test]]></root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-1494" class="py-name"><a title="lxml.etree._ElementTree.parser
4394 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1494', 'parser', 'link-748');">parser</a></tt><tt class="py-op">)</tt> </tt>
4395 <a name="L1323"></a><tt class="py-lineno">1323</tt> <tt class="py-line"> </tt>
4396 <a name="L1324"></a><tt class="py-lineno">1324</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-string">'test'</tt><tt class="py-op">,</tt> <tt id="link-1495" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1495', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1496" class="py-name"><a title="lxml.etree.QName.text
4397 lxml.etree._AppendOnlyElementProxy.text
4398 lxml.etree._Element.text
4399 lxml.etree._Entity.text
4400 lxml.etree._ModifyContentOnlyProxy.text
4401 lxml.etree._ReadOnlyEntityProxy.text
4402 lxml.etree._ReadOnlyProxy.text
4403 lxml.etree.__ContentOnlyElement.text
4404 lxml.objectify.ObjectifiedElement.text
4405 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-1496', 'text', 'link-194');">text</a></tt><tt class="py-op">)</tt> </tt>
4406 <a name="L1325"></a><tt class="py-lineno">1325</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1497" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1497', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root><![CDATA[test]]></root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
4407 <a name="L1326"></a><tt class="py-lineno">1326</tt> <tt class="py-line"> <tt id="link-1498" class="py-name"><a title="lxml.etree.XSLT.tostring
4409 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-1498', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt id="link-1499" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1499', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4410 </div><a name="L1327"></a><tt class="py-lineno">1327</tt> <tt class="py-line"> </tt>
4411 <a name="ETreeOnlyTestCase.test_cdata_xpath"></a><div id="ETreeOnlyTestCase.test_cdata_xpath-def"><a name="L1328"></a><tt class="py-lineno">1328</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_cdata_xpath-toggle" onclick="return toggle('ETreeOnlyTestCase.test_cdata_xpath');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_cdata_xpath">test_cdata_xpath</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4412 </div><div id="ETreeOnlyTestCase.test_cdata_xpath-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_cdata_xpath-expanded"><a name="L1329"></a><tt class="py-lineno">1329</tt> <tt class="py-line"> <tt id="link-1500" class="py-name"><a title="lxml.etree.XSLT.tostring
4414 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-1500', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1501" class="py-name"><a title="lxml.etree
4415 lxml.sax.ElementTreeContentHandler.etree
4416 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4417 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4418 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1501', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1502" class="py-name"><a title="lxml.etree.XSLT.tostring
4420 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-1502', 'tostring', 'link-597');">tostring</a></tt> </tt>
4421 <a name="L1330"></a><tt class="py-lineno">1330</tt> <tt class="py-line"> <tt id="link-1503" class="py-name"><a title="lxml.etree._ElementTree.parser
4422 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1503', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1504" class="py-name"><a title="lxml.etree
4423 lxml.sax.ElementTreeContentHandler.etree
4424 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4425 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4426 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1504', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1505" class="py-name"><a title="lxml.etree.XMLParser
4427 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-1505', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt class="py-name">strip_cdata</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
4428 <a name="L1331"></a><tt class="py-lineno">1331</tt> <tt class="py-line"> <tt id="link-1506" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1506', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1507" class="py-name"><a title="lxml.etree
4429 lxml.sax.ElementTreeContentHandler.etree
4430 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4431 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4432 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1507', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1508" class="py-name"><a title="lxml.etree.XML
4434 lxml.tests.test_objectify.ObjectifyTestCase.XML
4435 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1508', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-1509" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1509', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root><![CDATA[test]]></root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-1510" class="py-name"><a title="lxml.etree._ElementTree.parser
4436 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-1510', 'parser', 'link-748');">parser</a></tt><tt class="py-op">)</tt> </tt>
4437 <a name="L1332"></a><tt class="py-lineno">1332</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1511" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1511', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root><![CDATA[test]]></root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
4438 <a name="L1333"></a><tt class="py-lineno">1333</tt> <tt class="py-line"> <tt id="link-1512" class="py-name"><a title="lxml.etree.XSLT.tostring
4440 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-1512', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt id="link-1513" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1513', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4441 <a name="L1334"></a><tt class="py-lineno">1334</tt> <tt class="py-line"> </tt>
4442 <a name="L1335"></a><tt class="py-lineno">1335</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'test'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt id="link-1514" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1514', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1515" class="py-name" targets="Method lxml.cssselect.Attrib.xpath()=lxml.cssselect.Attrib-class.html#xpath,Method lxml.cssselect.Class.xpath()=lxml.cssselect.Class-class.html#xpath,Method lxml.cssselect.CombinedSelector.xpath()=lxml.cssselect.CombinedSelector-class.html#xpath,Method lxml.cssselect.Element.xpath()=lxml.cssselect.Element-class.html#xpath,Method lxml.cssselect.Function.xpath()=lxml.cssselect.Function-class.html#xpath,Method lxml.cssselect.Hash.xpath()=lxml.cssselect.Hash-class.html#xpath,Method lxml.cssselect.Or.xpath()=lxml.cssselect.Or-class.html#xpath,Method lxml.cssselect.Pseudo.xpath()=lxml.cssselect.Pseudo-class.html#xpath,Method lxml.etree._Element.xpath()=lxml.etree._Element-class.html#xpath,Method lxml.etree._ElementTree.xpath()=lxml.etree._ElementTree-class.html#xpath,Function lxml.tests.test_xpathevaluator.xpath()=lxml.tests.test_xpathevaluator-module.html#xpath"><a title="lxml.cssselect.Attrib.xpath
4443 lxml.cssselect.Class.xpath
4444 lxml.cssselect.CombinedSelector.xpath
4445 lxml.cssselect.Element.xpath
4446 lxml.cssselect.Function.xpath
4447 lxml.cssselect.Hash.xpath
4448 lxml.cssselect.Or.xpath
4449 lxml.cssselect.Pseudo.xpath
4450 lxml.etree._Element.xpath
4451 lxml.etree._ElementTree.xpath
4452 lxml.tests.test_xpathevaluator.xpath" class="py-name" href="#" onclick="return doclink('link-1515', 'xpath', 'link-1515');">xpath</a></tt><tt class="py-op">(</tt><tt class="py-string">'//text()'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4453 </div><a name="L1336"></a><tt class="py-lineno">1336</tt> <tt class="py-line"> </tt>
4454 <a name="L1337"></a><tt class="py-lineno">1337</tt> <tt class="py-line"> <tt class="py-comment"># TypeError in etree, AssertionError in ElementTree;</tt> </tt>
4455 <a name="ETreeOnlyTestCase.test_setitem_assert"></a><div id="ETreeOnlyTestCase.test_setitem_assert-def"><a name="L1338"></a><tt class="py-lineno">1338</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_setitem_assert-toggle" onclick="return toggle('ETreeOnlyTestCase.test_setitem_assert');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_setitem_assert">test_setitem_assert</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4456 </div><div id="ETreeOnlyTestCase.test_setitem_assert-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_setitem_assert-expanded"><a name="L1339"></a><tt class="py-lineno">1339</tt> <tt class="py-line"> <tt id="link-1516" class="py-name"><a title="lxml.cssselect.Element
4459 lxml.objectify.Element
4460 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4461 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1516', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1517" class="py-name"><a title="lxml.etree
4462 lxml.sax.ElementTreeContentHandler.etree
4463 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4464 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4465 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1517', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1518" class="py-name"><a title="lxml.cssselect.Element
4468 lxml.objectify.Element
4469 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4470 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1518', 'Element', 'link-69');">Element</a></tt> </tt>
4471 <a name="L1340"></a><tt class="py-lineno">1340</tt> <tt class="py-line"> <tt id="link-1519" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1519', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1520" class="py-name"><a title="lxml.etree
4472 lxml.sax.ElementTreeContentHandler.etree
4473 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4474 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4475 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1520', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1521" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1521', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
4476 <a name="L1341"></a><tt class="py-lineno">1341</tt> <tt class="py-line"> </tt>
4477 <a name="L1342"></a><tt class="py-lineno">1342</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-1522" class="py-name"><a title="lxml.cssselect.Element
4480 lxml.objectify.Element
4481 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4482 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1522', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
4483 <a name="L1343"></a><tt class="py-lineno">1343</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-1523" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1523', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
4484 <a name="L1344"></a><tt class="py-lineno">1344</tt> <tt class="py-line"> </tt>
4485 <a name="L1345"></a><tt class="py-lineno">1345</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">TypeError</tt><tt class="py-op">,</tt> </tt>
4486 <a name="L1346"></a><tt class="py-lineno">1346</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-1524" class="py-name" targets="Method lxml.etree._Attrib.__setitem__()=lxml.etree._Attrib-class.html#__setitem__,Method lxml.etree._ClassNamespaceRegistry.__setitem__()=lxml.etree._ClassNamespaceRegistry-class.html#__setitem__,Method lxml.etree._Element.__setitem__()=lxml.etree._Element-class.html#__setitem__,Method lxml.etree._FunctionNamespaceRegistry.__setitem__()=lxml.etree._FunctionNamespaceRegistry-class.html#__setitem__,Method lxml.etree._NamespaceRegistry.__setitem__()=lxml.etree._NamespaceRegistry-class.html#__setitem__,Method lxml.etree.__ContentOnlyElement.__setitem__()=lxml.etree.__ContentOnlyElement-class.html#__setitem__,Method lxml.html.FieldsDict.__setitem__()=lxml.html.FieldsDict-class.html#__setitem__,Method lxml.objectify.ObjectifiedElement.__setitem__()=lxml.objectify.ObjectifiedElement-class.html#__setitem__"><a title="lxml.etree._Attrib.__setitem__
4487 lxml.etree._ClassNamespaceRegistry.__setitem__
4488 lxml.etree._Element.__setitem__
4489 lxml.etree._FunctionNamespaceRegistry.__setitem__
4490 lxml.etree._NamespaceRegistry.__setitem__
4491 lxml.etree.__ContentOnlyElement.__setitem__
4492 lxml.html.FieldsDict.__setitem__
4493 lxml.objectify.ObjectifiedElement.__setitem__" class="py-name" href="#" onclick="return doclink('link-1524', '__setitem__', 'link-1524');">__setitem__</a></tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-string">'foo'</tt><tt class="py-op">)</tt> </tt>
4494 </div><a name="L1347"></a><tt class="py-lineno">1347</tt> <tt class="py-line"> </tt>
4495 <a name="ETreeOnlyTestCase.test_append_error"></a><div id="ETreeOnlyTestCase.test_append_error-def"><a name="L1348"></a><tt class="py-lineno">1348</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_append_error-toggle" onclick="return toggle('ETreeOnlyTestCase.test_append_error');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_append_error">test_append_error</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4496 </div><div id="ETreeOnlyTestCase.test_append_error-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_append_error-expanded"><a name="L1349"></a><tt class="py-lineno">1349</tt> <tt class="py-line"> <tt id="link-1525" class="py-name"><a title="lxml.cssselect.Element
4499 lxml.objectify.Element
4500 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4501 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1525', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1526" class="py-name"><a title="lxml.etree
4502 lxml.sax.ElementTreeContentHandler.etree
4503 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4504 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4505 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1526', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1527" class="py-name"><a title="lxml.cssselect.Element
4508 lxml.objectify.Element
4509 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4510 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1527', 'Element', 'link-69');">Element</a></tt> </tt>
4511 <a name="L1350"></a><tt class="py-lineno">1350</tt> <tt class="py-line"> <tt id="link-1528" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1528', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-1529" class="py-name"><a title="lxml.cssselect.Element
4514 lxml.objectify.Element
4515 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4516 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1529', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'root'</tt><tt class="py-op">)</tt> </tt>
4517 <a name="L1351"></a><tt class="py-lineno">1351</tt> <tt class="py-line"> <tt class="py-comment"># raises AssertionError in ElementTree</tt> </tt>
4518 <a name="L1352"></a><tt class="py-lineno">1352</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">TypeError</tt><tt class="py-op">,</tt> <tt id="link-1530" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1530', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1531" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
4519 lxml.etree._Element.append
4520 lxml.etree._OpaqueDocumentWrapper.append
4521 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1531', 'append', 'link-621');">append</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
4522 <a name="L1353"></a><tt class="py-lineno">1353</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">TypeError</tt><tt class="py-op">,</tt> <tt id="link-1532" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1532', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1533" class="py-name" targets="Method lxml.etree._AppendOnlyElementProxy.extend()=lxml.etree._AppendOnlyElementProxy-class.html#extend,Method lxml.etree._Element.extend()=lxml.etree._Element-class.html#extend,Method lxml.etree._OpaqueDocumentWrapper.extend()=lxml.etree._OpaqueDocumentWrapper-class.html#extend"><a title="lxml.etree._AppendOnlyElementProxy.extend
4523 lxml.etree._Element.extend
4524 lxml.etree._OpaqueDocumentWrapper.extend" class="py-name" href="#" onclick="return doclink('link-1533', 'extend', 'link-1533');">extend</a></tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-name">None</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
4525 <a name="L1354"></a><tt class="py-lineno">1354</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">TypeError</tt><tt class="py-op">,</tt> <tt id="link-1534" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1534', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1535" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.extend
4526 lxml.etree._Element.extend
4527 lxml.etree._OpaqueDocumentWrapper.extend" class="py-name" href="#" onclick="return doclink('link-1535', 'extend', 'link-1533');">extend</a></tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt id="link-1536" class="py-name"><a title="lxml.cssselect.Element
4530 lxml.objectify.Element
4531 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4532 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1536', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'one'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
4533 <a name="L1355"></a><tt class="py-lineno">1355</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-string">'one'</tt><tt class="py-op">,</tt> <tt id="link-1537" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1537', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1538" class="py-name"><a title="lxml.etree._Comment.tag
4534 lxml.etree._Element.tag
4535 lxml.etree._Entity.tag
4536 lxml.etree._ProcessingInstruction.tag
4537 lxml.etree._ReadOnlyProxy.tag
4538 lxml.tests.test_xpathevaluator.tag
4539 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1538', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
4540 </div><a name="L1356"></a><tt class="py-lineno">1356</tt> <tt class="py-line"> </tt>
4541 <a name="ETreeOnlyTestCase.test_addnext"></a><div id="ETreeOnlyTestCase.test_addnext-def"><a name="L1357"></a><tt class="py-lineno">1357</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_addnext-toggle" onclick="return toggle('ETreeOnlyTestCase.test_addnext');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addnext">test_addnext</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4542 </div><div id="ETreeOnlyTestCase.test_addnext-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_addnext-expanded"><a name="L1358"></a><tt class="py-lineno">1358</tt> <tt class="py-line"> <tt id="link-1539" class="py-name"><a title="lxml.cssselect.Element
4545 lxml.objectify.Element
4546 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4547 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1539', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1540" class="py-name"><a title="lxml.etree
4548 lxml.sax.ElementTreeContentHandler.etree
4549 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4550 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4551 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1540', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1541" class="py-name"><a title="lxml.cssselect.Element
4554 lxml.objectify.Element
4555 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4556 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1541', 'Element', 'link-69');">Element</a></tt> </tt>
4557 <a name="L1359"></a><tt class="py-lineno">1359</tt> <tt class="py-line"> <tt id="link-1542" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1542', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1543" class="py-name"><a title="lxml.etree
4558 lxml.sax.ElementTreeContentHandler.etree
4559 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4560 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4561 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1543', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1544" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1544', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
4562 <a name="L1360"></a><tt class="py-lineno">1360</tt> <tt class="py-line"> <tt id="link-1545" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1545', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-1546" class="py-name"><a title="lxml.cssselect.Element
4565 lxml.objectify.Element
4566 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4567 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1546', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'root'</tt><tt class="py-op">)</tt> </tt>
4568 <a name="L1361"></a><tt class="py-lineno">1361</tt> <tt class="py-line"> <tt id="link-1547" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1547', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt id="link-1548" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1548', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
4569 <a name="L1362"></a><tt class="py-lineno">1362</tt> <tt class="py-line"> <tt id="link-1549" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1549', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt id="link-1550" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1550', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
4570 <a name="L1363"></a><tt class="py-lineno">1363</tt> <tt class="py-line"> </tt>
4571 <a name="L1364"></a><tt class="py-lineno">1364</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'a'</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
4572 <a name="L1365"></a><tt class="py-lineno">1365</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-1551" class="py-name"><a title="lxml.etree._Comment.tag
4573 lxml.etree._Element.tag
4574 lxml.etree._Entity.tag
4575 lxml.etree._ProcessingInstruction.tag
4576 lxml.etree._ReadOnlyProxy.tag
4577 lxml.tests.test_xpathevaluator.tag
4578 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1551', 'tag', 'link-73');">tag</a></tt> <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt id="link-1552" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1552', 'root', 'link-220');">root</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
4579 <a name="L1366"></a><tt class="py-lineno">1366</tt> <tt class="py-line"> <tt id="link-1553" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1553', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1554" class="py-name" targets="Method lxml.etree._Element.addnext()=lxml.etree._Element-class.html#addnext"><a title="lxml.etree._Element.addnext" class="py-name" href="#" onclick="return doclink('link-1554', 'addnext', 'link-1554');">addnext</a></tt><tt class="py-op">(</tt><tt id="link-1555" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1555', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
4580 <a name="L1367"></a><tt class="py-lineno">1367</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'b'</tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
4581 <a name="L1368"></a><tt class="py-lineno">1368</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-1556" class="py-name"><a title="lxml.etree._Comment.tag
4582 lxml.etree._Element.tag
4583 lxml.etree._Entity.tag
4584 lxml.etree._ProcessingInstruction.tag
4585 lxml.etree._ReadOnlyProxy.tag
4586 lxml.tests.test_xpathevaluator.tag
4587 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1556', 'tag', 'link-73');">tag</a></tt> <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt id="link-1557" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1557', 'root', 'link-220');">root</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
4588 </div><a name="L1369"></a><tt class="py-lineno">1369</tt> <tt class="py-line"> </tt>
4589 <a name="ETreeOnlyTestCase.test_addprevious"></a><div id="ETreeOnlyTestCase.test_addprevious-def"><a name="L1370"></a><tt class="py-lineno">1370</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_addprevious-toggle" onclick="return toggle('ETreeOnlyTestCase.test_addprevious');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addprevious">test_addprevious</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4590 </div><div id="ETreeOnlyTestCase.test_addprevious-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_addprevious-expanded"><a name="L1371"></a><tt class="py-lineno">1371</tt> <tt class="py-line"> <tt id="link-1558" class="py-name"><a title="lxml.cssselect.Element
4593 lxml.objectify.Element
4594 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4595 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1558', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1559" class="py-name"><a title="lxml.etree
4596 lxml.sax.ElementTreeContentHandler.etree
4597 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4598 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4599 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1559', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1560" class="py-name"><a title="lxml.cssselect.Element
4602 lxml.objectify.Element
4603 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4604 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1560', 'Element', 'link-69');">Element</a></tt> </tt>
4605 <a name="L1372"></a><tt class="py-lineno">1372</tt> <tt class="py-line"> <tt id="link-1561" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1561', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1562" class="py-name"><a title="lxml.etree
4606 lxml.sax.ElementTreeContentHandler.etree
4607 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4608 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4609 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1562', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1563" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1563', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
4610 <a name="L1373"></a><tt class="py-lineno">1373</tt> <tt class="py-line"> <tt id="link-1564" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1564', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-1565" class="py-name"><a title="lxml.cssselect.Element
4613 lxml.objectify.Element
4614 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4615 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1565', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'root'</tt><tt class="py-op">)</tt> </tt>
4616 <a name="L1374"></a><tt class="py-lineno">1374</tt> <tt class="py-line"> <tt id="link-1566" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1566', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt id="link-1567" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1567', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
4617 <a name="L1375"></a><tt class="py-lineno">1375</tt> <tt class="py-line"> <tt id="link-1568" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1568', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt id="link-1569" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1569', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
4618 <a name="L1376"></a><tt class="py-lineno">1376</tt> <tt class="py-line"> </tt>
4619 <a name="L1377"></a><tt class="py-lineno">1377</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'a'</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
4620 <a name="L1378"></a><tt class="py-lineno">1378</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-1570" class="py-name"><a title="lxml.etree._Comment.tag
4621 lxml.etree._Element.tag
4622 lxml.etree._Entity.tag
4623 lxml.etree._ProcessingInstruction.tag
4624 lxml.etree._ReadOnlyProxy.tag
4625 lxml.tests.test_xpathevaluator.tag
4626 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1570', 'tag', 'link-73');">tag</a></tt> <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt id="link-1571" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1571', 'root', 'link-220');">root</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
4627 <a name="L1379"></a><tt class="py-lineno">1379</tt> <tt class="py-line"> <tt id="link-1572" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1572', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1573" class="py-name" targets="Method lxml.etree._Element.addprevious()=lxml.etree._Element-class.html#addprevious"><a title="lxml.etree._Element.addprevious" class="py-name" href="#" onclick="return doclink('link-1573', 'addprevious', 'link-1573');">addprevious</a></tt><tt class="py-op">(</tt><tt id="link-1574" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1574', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
4628 <a name="L1380"></a><tt class="py-lineno">1380</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'b'</tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
4629 <a name="L1381"></a><tt class="py-lineno">1381</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-1575" class="py-name"><a title="lxml.etree._Comment.tag
4630 lxml.etree._Element.tag
4631 lxml.etree._Entity.tag
4632 lxml.etree._ProcessingInstruction.tag
4633 lxml.etree._ReadOnlyProxy.tag
4634 lxml.tests.test_xpathevaluator.tag
4635 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1575', 'tag', 'link-73');">tag</a></tt> <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt id="link-1576" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1576', 'root', 'link-220');">root</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
4636 </div><a name="L1382"></a><tt class="py-lineno">1382</tt> <tt class="py-line"> </tt>
4637 <a name="ETreeOnlyTestCase.test_addnext_root"></a><div id="ETreeOnlyTestCase.test_addnext_root-def"><a name="L1383"></a><tt class="py-lineno">1383</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_addnext_root-toggle" onclick="return toggle('ETreeOnlyTestCase.test_addnext_root');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addnext_root">test_addnext_root</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4638 </div><div id="ETreeOnlyTestCase.test_addnext_root-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_addnext_root-expanded"><a name="L1384"></a><tt class="py-lineno">1384</tt> <tt class="py-line"> <tt id="link-1577" class="py-name"><a title="lxml.cssselect.Element
4641 lxml.objectify.Element
4642 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4643 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1577', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1578" class="py-name"><a title="lxml.etree
4644 lxml.sax.ElementTreeContentHandler.etree
4645 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4646 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4647 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1578', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1579" class="py-name"><a title="lxml.cssselect.Element
4650 lxml.objectify.Element
4651 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4652 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1579', 'Element', 'link-69');">Element</a></tt> </tt>
4653 <a name="L1385"></a><tt class="py-lineno">1385</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-1580" class="py-name"><a title="lxml.cssselect.Element
4656 lxml.objectify.Element
4657 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4658 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1580', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
4659 <a name="L1386"></a><tt class="py-lineno">1386</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-1581" class="py-name"><a title="lxml.cssselect.Element
4662 lxml.objectify.Element
4663 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4664 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1581', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
4665 <a name="L1387"></a><tt class="py-lineno">1387</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">TypeError</tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-1582" class="py-name"><a title="lxml.etree._Element.addnext" class="py-name" href="#" onclick="return doclink('link-1582', 'addnext', 'link-1554');">addnext</a></tt><tt class="py-op">,</tt> <tt class="py-name">b</tt><tt class="py-op">)</tt> </tt>
4666 </div><a name="L1388"></a><tt class="py-lineno">1388</tt> <tt class="py-line"> </tt>
4667 <a name="ETreeOnlyTestCase.test_addnext_root"></a><div id="ETreeOnlyTestCase.test_addnext_root-def"><a name="L1389"></a><tt class="py-lineno">1389</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_addnext_root-toggle" onclick="return toggle('ETreeOnlyTestCase.test_addnext_root');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addnext_root">test_addnext_root</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4668 </div><div id="ETreeOnlyTestCase.test_addnext_root-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_addnext_root-expanded"><a name="L1390"></a><tt class="py-lineno">1390</tt> <tt class="py-line"> <tt id="link-1583" class="py-name"><a title="lxml.cssselect.Element
4671 lxml.objectify.Element
4672 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4673 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1583', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1584" class="py-name"><a title="lxml.etree
4674 lxml.sax.ElementTreeContentHandler.etree
4675 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4676 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4677 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1584', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1585" class="py-name"><a title="lxml.cssselect.Element
4680 lxml.objectify.Element
4681 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4682 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1585', 'Element', 'link-69');">Element</a></tt> </tt>
4683 <a name="L1391"></a><tt class="py-lineno">1391</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-1586" class="py-name"><a title="lxml.cssselect.Element
4686 lxml.objectify.Element
4687 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4688 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1586', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
4689 <a name="L1392"></a><tt class="py-lineno">1392</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-1587" class="py-name"><a title="lxml.cssselect.Element
4692 lxml.objectify.Element
4693 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4694 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1587', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
4695 <a name="L1393"></a><tt class="py-lineno">1393</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">TypeError</tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-1588" class="py-name"><a title="lxml.etree._Element.addnext" class="py-name" href="#" onclick="return doclink('link-1588', 'addnext', 'link-1554');">addnext</a></tt><tt class="py-op">,</tt> <tt class="py-name">b</tt><tt class="py-op">)</tt> </tt>
4696 </div><a name="L1394"></a><tt class="py-lineno">1394</tt> <tt class="py-line"> </tt>
4697 <a name="ETreeOnlyTestCase.test_addprevious_pi"></a><div id="ETreeOnlyTestCase.test_addprevious_pi-def"><a name="L1395"></a><tt class="py-lineno">1395</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_addprevious_pi-toggle" onclick="return toggle('ETreeOnlyTestCase.test_addprevious_pi');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addprevious_pi">test_addprevious_pi</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4698 </div><div id="ETreeOnlyTestCase.test_addprevious_pi-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_addprevious_pi-expanded"><a name="L1396"></a><tt class="py-lineno">1396</tt> <tt class="py-line"> <tt id="link-1589" class="py-name"><a title="lxml.cssselect.Element
4701 lxml.objectify.Element
4702 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4703 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1589', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1590" class="py-name"><a title="lxml.etree
4704 lxml.sax.ElementTreeContentHandler.etree
4705 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4706 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4707 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1590', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1591" class="py-name"><a title="lxml.cssselect.Element
4710 lxml.objectify.Element
4711 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4712 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1591', 'Element', 'link-69');">Element</a></tt> </tt>
4713 <a name="L1397"></a><tt class="py-lineno">1397</tt> <tt class="py-line"> <tt id="link-1592" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1592', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1593" class="py-name"><a title="lxml.etree
4714 lxml.sax.ElementTreeContentHandler.etree
4715 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4716 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4717 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1593', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1594" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1594', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
4718 <a name="L1398"></a><tt class="py-lineno">1398</tt> <tt class="py-line"> <tt id="link-1595" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-1595', 'PI', 'link-416');">PI</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1596" class="py-name"><a title="lxml.etree
4719 lxml.sax.ElementTreeContentHandler.etree
4720 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4721 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4722 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1596', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1597" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-1597', 'PI', 'link-416');">PI</a></tt> </tt>
4723 <a name="L1399"></a><tt class="py-lineno">1399</tt> <tt class="py-line"> <tt id="link-1598" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1598', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-1599" class="py-name"><a title="lxml.cssselect.Element
4726 lxml.objectify.Element
4727 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4728 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1599', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'root'</tt><tt class="py-op">)</tt> </tt>
4729 <a name="L1400"></a><tt class="py-lineno">1400</tt> <tt class="py-line"> <tt id="link-1600" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1600', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt id="link-1601" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1601', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
4730 <a name="L1401"></a><tt class="py-lineno">1401</tt> <tt class="py-line"> <tt id="link-1602" class="py-name" targets="Method lxml.etree.TreeBuilder.pi()=lxml.etree.TreeBuilder-class.html#pi"><a title="lxml.etree.TreeBuilder.pi" class="py-name" href="#" onclick="return doclink('link-1602', 'pi', 'link-1602');">pi</a></tt> <tt class="py-op">=</tt> <tt id="link-1603" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-1603', 'PI', 'link-416');">PI</a></tt><tt class="py-op">(</tt><tt class="py-string">'TARGET'</tt><tt class="py-op">,</tt> <tt class="py-string">'TEXT'</tt><tt class="py-op">)</tt> </tt>
4731 <a name="L1402"></a><tt class="py-lineno">1402</tt> <tt class="py-line"> <tt id="link-1604" class="py-name"><a title="lxml.etree.TreeBuilder.pi" class="py-name" href="#" onclick="return doclink('link-1604', 'pi', 'link-1602');">pi</a></tt><tt class="py-op">.</tt><tt id="link-1605" class="py-name"><a title="lxml.etree._Element.tail
4732 lxml.etree._ReadOnlyProxy.tail
4733 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-1605', 'tail', 'link-850');">tail</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"TAIL"</tt> </tt>
4734 <a name="L1403"></a><tt class="py-lineno">1403</tt> <tt class="py-line"> </tt>
4735 <a name="L1404"></a><tt class="py-lineno">1404</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1606" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1606', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root><a></a></root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
4736 <a name="L1405"></a><tt class="py-lineno">1405</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1607" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
4737 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-1607', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-1608" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1608', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4738 <a name="L1406"></a><tt class="py-lineno">1406</tt> <tt class="py-line"> <tt id="link-1609" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1609', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1610" class="py-name"><a title="lxml.etree._Element.addprevious" class="py-name" href="#" onclick="return doclink('link-1610', 'addprevious', 'link-1573');">addprevious</a></tt><tt class="py-op">(</tt><tt id="link-1611" class="py-name"><a title="lxml.etree.TreeBuilder.pi" class="py-name" href="#" onclick="return doclink('link-1611', 'pi', 'link-1602');">pi</a></tt><tt class="py-op">)</tt> </tt>
4739 <a name="L1407"></a><tt class="py-lineno">1407</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1612" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1612', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root><?TARGET TEXT?>TAIL<a></a></root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
4740 <a name="L1408"></a><tt class="py-lineno">1408</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1613" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
4741 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-1613', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-1614" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1614', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4742 </div><a name="L1409"></a><tt class="py-lineno">1409</tt> <tt class="py-line"> </tt>
4743 <a name="ETreeOnlyTestCase.test_addprevious_root_pi"></a><div id="ETreeOnlyTestCase.test_addprevious_root_pi-def"><a name="L1410"></a><tt class="py-lineno">1410</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_addprevious_root_pi-toggle" onclick="return toggle('ETreeOnlyTestCase.test_addprevious_root_pi');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addprevious_root_pi">test_addprevious_root_pi</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4744 </div><div id="ETreeOnlyTestCase.test_addprevious_root_pi-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_addprevious_root_pi-expanded"><a name="L1411"></a><tt class="py-lineno">1411</tt> <tt class="py-line"> <tt id="link-1615" class="py-name"><a title="lxml.cssselect.Element
4747 lxml.objectify.Element
4748 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4749 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1615', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1616" class="py-name"><a title="lxml.etree
4750 lxml.sax.ElementTreeContentHandler.etree
4751 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4752 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4753 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1616', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1617" class="py-name"><a title="lxml.cssselect.Element
4756 lxml.objectify.Element
4757 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4758 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1617', 'Element', 'link-69');">Element</a></tt> </tt>
4759 <a name="L1412"></a><tt class="py-lineno">1412</tt> <tt class="py-line"> <tt id="link-1618" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-1618', 'PI', 'link-416');">PI</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1619" class="py-name"><a title="lxml.etree
4760 lxml.sax.ElementTreeContentHandler.etree
4761 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4762 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4763 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1619', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1620" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-1620', 'PI', 'link-416');">PI</a></tt> </tt>
4764 <a name="L1413"></a><tt class="py-lineno">1413</tt> <tt class="py-line"> <tt id="link-1621" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1621', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-1622" class="py-name"><a title="lxml.cssselect.Element
4767 lxml.objectify.Element
4768 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4769 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1622', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'root'</tt><tt class="py-op">)</tt> </tt>
4770 <a name="L1414"></a><tt class="py-lineno">1414</tt> <tt class="py-line"> <tt id="link-1623" class="py-name"><a title="lxml.etree.TreeBuilder.pi" class="py-name" href="#" onclick="return doclink('link-1623', 'pi', 'link-1602');">pi</a></tt> <tt class="py-op">=</tt> <tt id="link-1624" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-1624', 'PI', 'link-416');">PI</a></tt><tt class="py-op">(</tt><tt class="py-string">'TARGET'</tt><tt class="py-op">,</tt> <tt class="py-string">'TEXT'</tt><tt class="py-op">)</tt> </tt>
4771 <a name="L1415"></a><tt class="py-lineno">1415</tt> <tt class="py-line"> <tt id="link-1625" class="py-name"><a title="lxml.etree.TreeBuilder.pi" class="py-name" href="#" onclick="return doclink('link-1625', 'pi', 'link-1602');">pi</a></tt><tt class="py-op">.</tt><tt id="link-1626" class="py-name"><a title="lxml.etree._Element.tail
4772 lxml.etree._ReadOnlyProxy.tail
4773 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-1626', 'tail', 'link-850');">tail</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"TAIL"</tt> </tt>
4774 <a name="L1416"></a><tt class="py-lineno">1416</tt> <tt class="py-line"> </tt>
4775 <a name="L1417"></a><tt class="py-lineno">1417</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1627" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1627', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root></root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
4776 <a name="L1418"></a><tt class="py-lineno">1418</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1628" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
4777 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-1628', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-1629" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1629', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4778 <a name="L1419"></a><tt class="py-lineno">1419</tt> <tt class="py-line"> <tt id="link-1630" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1630', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1631" class="py-name"><a title="lxml.etree._Element.addprevious" class="py-name" href="#" onclick="return doclink('link-1631', 'addprevious', 'link-1573');">addprevious</a></tt><tt class="py-op">(</tt><tt id="link-1632" class="py-name"><a title="lxml.etree.TreeBuilder.pi" class="py-name" href="#" onclick="return doclink('link-1632', 'pi', 'link-1602');">pi</a></tt><tt class="py-op">)</tt> </tt>
4779 <a name="L1420"></a><tt class="py-lineno">1420</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1633" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1633', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<?TARGET TEXT?>\n<root></root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
4780 <a name="L1421"></a><tt class="py-lineno">1421</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1634" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
4781 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-1634', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-1635" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1635', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4782 </div><a name="L1422"></a><tt class="py-lineno">1422</tt> <tt class="py-line"> </tt>
4783 <a name="ETreeOnlyTestCase.test_addnext_pi"></a><div id="ETreeOnlyTestCase.test_addnext_pi-def"><a name="L1423"></a><tt class="py-lineno">1423</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_addnext_pi-toggle" onclick="return toggle('ETreeOnlyTestCase.test_addnext_pi');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addnext_pi">test_addnext_pi</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4784 </div><div id="ETreeOnlyTestCase.test_addnext_pi-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_addnext_pi-expanded"><a name="L1424"></a><tt class="py-lineno">1424</tt> <tt class="py-line"> <tt id="link-1636" class="py-name"><a title="lxml.cssselect.Element
4787 lxml.objectify.Element
4788 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4789 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1636', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1637" class="py-name"><a title="lxml.etree
4790 lxml.sax.ElementTreeContentHandler.etree
4791 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4792 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4793 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1637', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1638" class="py-name"><a title="lxml.cssselect.Element
4796 lxml.objectify.Element
4797 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4798 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1638', 'Element', 'link-69');">Element</a></tt> </tt>
4799 <a name="L1425"></a><tt class="py-lineno">1425</tt> <tt class="py-line"> <tt id="link-1639" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1639', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1640" class="py-name"><a title="lxml.etree
4800 lxml.sax.ElementTreeContentHandler.etree
4801 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4802 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4803 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1640', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1641" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1641', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
4804 <a name="L1426"></a><tt class="py-lineno">1426</tt> <tt class="py-line"> <tt id="link-1642" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-1642', 'PI', 'link-416');">PI</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1643" class="py-name"><a title="lxml.etree
4805 lxml.sax.ElementTreeContentHandler.etree
4806 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4807 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4808 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1643', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1644" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-1644', 'PI', 'link-416');">PI</a></tt> </tt>
4809 <a name="L1427"></a><tt class="py-lineno">1427</tt> <tt class="py-line"> <tt id="link-1645" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1645', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-1646" class="py-name"><a title="lxml.cssselect.Element
4812 lxml.objectify.Element
4813 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4814 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1646', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'root'</tt><tt class="py-op">)</tt> </tt>
4815 <a name="L1428"></a><tt class="py-lineno">1428</tt> <tt class="py-line"> <tt id="link-1647" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1647', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt id="link-1648" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1648', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
4816 <a name="L1429"></a><tt class="py-lineno">1429</tt> <tt class="py-line"> <tt id="link-1649" class="py-name"><a title="lxml.etree.TreeBuilder.pi" class="py-name" href="#" onclick="return doclink('link-1649', 'pi', 'link-1602');">pi</a></tt> <tt class="py-op">=</tt> <tt id="link-1650" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-1650', 'PI', 'link-416');">PI</a></tt><tt class="py-op">(</tt><tt class="py-string">'TARGET'</tt><tt class="py-op">,</tt> <tt class="py-string">'TEXT'</tt><tt class="py-op">)</tt> </tt>
4817 <a name="L1430"></a><tt class="py-lineno">1430</tt> <tt class="py-line"> <tt id="link-1651" class="py-name"><a title="lxml.etree.TreeBuilder.pi" class="py-name" href="#" onclick="return doclink('link-1651', 'pi', 'link-1602');">pi</a></tt><tt class="py-op">.</tt><tt id="link-1652" class="py-name"><a title="lxml.etree._Element.tail
4818 lxml.etree._ReadOnlyProxy.tail
4819 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-1652', 'tail', 'link-850');">tail</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"TAIL"</tt> </tt>
4820 <a name="L1431"></a><tt class="py-lineno">1431</tt> <tt class="py-line"> </tt>
4821 <a name="L1432"></a><tt class="py-lineno">1432</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1653" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1653', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root><a></a></root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
4822 <a name="L1433"></a><tt class="py-lineno">1433</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1654" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
4823 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-1654', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-1655" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1655', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4824 <a name="L1434"></a><tt class="py-lineno">1434</tt> <tt class="py-line"> <tt id="link-1656" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1656', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1657" class="py-name"><a title="lxml.etree._Element.addnext" class="py-name" href="#" onclick="return doclink('link-1657', 'addnext', 'link-1554');">addnext</a></tt><tt class="py-op">(</tt><tt id="link-1658" class="py-name"><a title="lxml.etree.TreeBuilder.pi" class="py-name" href="#" onclick="return doclink('link-1658', 'pi', 'link-1602');">pi</a></tt><tt class="py-op">)</tt> </tt>
4825 <a name="L1435"></a><tt class="py-lineno">1435</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1659" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1659', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root><a></a><?TARGET TEXT?>TAIL</root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
4826 <a name="L1436"></a><tt class="py-lineno">1436</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1660" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
4827 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-1660', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-1661" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1661', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4828 </div><a name="L1437"></a><tt class="py-lineno">1437</tt> <tt class="py-line"> </tt>
4829 <a name="ETreeOnlyTestCase.test_addnext_root_pi"></a><div id="ETreeOnlyTestCase.test_addnext_root_pi-def"><a name="L1438"></a><tt class="py-lineno">1438</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_addnext_root_pi-toggle" onclick="return toggle('ETreeOnlyTestCase.test_addnext_root_pi');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addnext_root_pi">test_addnext_root_pi</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4830 </div><div id="ETreeOnlyTestCase.test_addnext_root_pi-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_addnext_root_pi-expanded"><a name="L1439"></a><tt class="py-lineno">1439</tt> <tt class="py-line"> <tt id="link-1662" class="py-name"><a title="lxml.cssselect.Element
4833 lxml.objectify.Element
4834 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4835 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1662', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1663" class="py-name"><a title="lxml.etree
4836 lxml.sax.ElementTreeContentHandler.etree
4837 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4838 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4839 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1663', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1664" class="py-name"><a title="lxml.cssselect.Element
4842 lxml.objectify.Element
4843 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4844 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1664', 'Element', 'link-69');">Element</a></tt> </tt>
4845 <a name="L1440"></a><tt class="py-lineno">1440</tt> <tt class="py-line"> <tt id="link-1665" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-1665', 'PI', 'link-416');">PI</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1666" class="py-name"><a title="lxml.etree
4846 lxml.sax.ElementTreeContentHandler.etree
4847 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4848 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4849 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1666', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1667" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-1667', 'PI', 'link-416');">PI</a></tt> </tt>
4850 <a name="L1441"></a><tt class="py-lineno">1441</tt> <tt class="py-line"> <tt id="link-1668" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1668', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-1669" class="py-name"><a title="lxml.cssselect.Element
4853 lxml.objectify.Element
4854 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4855 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1669', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'root'</tt><tt class="py-op">)</tt> </tt>
4856 <a name="L1442"></a><tt class="py-lineno">1442</tt> <tt class="py-line"> <tt id="link-1670" class="py-name"><a title="lxml.etree.TreeBuilder.pi" class="py-name" href="#" onclick="return doclink('link-1670', 'pi', 'link-1602');">pi</a></tt> <tt class="py-op">=</tt> <tt id="link-1671" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-1671', 'PI', 'link-416');">PI</a></tt><tt class="py-op">(</tt><tt class="py-string">'TARGET'</tt><tt class="py-op">,</tt> <tt class="py-string">'TEXT'</tt><tt class="py-op">)</tt> </tt>
4857 <a name="L1443"></a><tt class="py-lineno">1443</tt> <tt class="py-line"> <tt id="link-1672" class="py-name"><a title="lxml.etree.TreeBuilder.pi" class="py-name" href="#" onclick="return doclink('link-1672', 'pi', 'link-1602');">pi</a></tt><tt class="py-op">.</tt><tt id="link-1673" class="py-name"><a title="lxml.etree._Element.tail
4858 lxml.etree._ReadOnlyProxy.tail
4859 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-1673', 'tail', 'link-850');">tail</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"TAIL"</tt> </tt>
4860 <a name="L1444"></a><tt class="py-lineno">1444</tt> <tt class="py-line"> </tt>
4861 <a name="L1445"></a><tt class="py-lineno">1445</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1674" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1674', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root></root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
4862 <a name="L1446"></a><tt class="py-lineno">1446</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1675" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
4863 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-1675', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-1676" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1676', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4864 <a name="L1447"></a><tt class="py-lineno">1447</tt> <tt class="py-line"> <tt id="link-1677" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1677', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1678" class="py-name"><a title="lxml.etree._Element.addnext" class="py-name" href="#" onclick="return doclink('link-1678', 'addnext', 'link-1554');">addnext</a></tt><tt class="py-op">(</tt><tt id="link-1679" class="py-name"><a title="lxml.etree.TreeBuilder.pi" class="py-name" href="#" onclick="return doclink('link-1679', 'pi', 'link-1602');">pi</a></tt><tt class="py-op">)</tt> </tt>
4865 <a name="L1448"></a><tt class="py-lineno">1448</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1680" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1680', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root></root>\n<?TARGET TEXT?>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
4866 <a name="L1449"></a><tt class="py-lineno">1449</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1681" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
4867 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-1681', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-1682" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1682', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4868 </div><a name="L1450"></a><tt class="py-lineno">1450</tt> <tt class="py-line"> </tt>
4869 <a name="ETreeOnlyTestCase.test_addnext_comment"></a><div id="ETreeOnlyTestCase.test_addnext_comment-def"><a name="L1451"></a><tt class="py-lineno">1451</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_addnext_comment-toggle" onclick="return toggle('ETreeOnlyTestCase.test_addnext_comment');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addnext_comment">test_addnext_comment</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4870 </div><div id="ETreeOnlyTestCase.test_addnext_comment-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_addnext_comment-expanded"><a name="L1452"></a><tt class="py-lineno">1452</tt> <tt class="py-line"> <tt id="link-1683" class="py-name"><a title="lxml.cssselect.Element
4873 lxml.objectify.Element
4874 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4875 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1683', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1684" class="py-name"><a title="lxml.etree
4876 lxml.sax.ElementTreeContentHandler.etree
4877 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4878 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4879 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1684', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1685" class="py-name"><a title="lxml.cssselect.Element
4882 lxml.objectify.Element
4883 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4884 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1685', 'Element', 'link-69');">Element</a></tt> </tt>
4885 <a name="L1453"></a><tt class="py-lineno">1453</tt> <tt class="py-line"> <tt id="link-1686" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1686', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1687" class="py-name"><a title="lxml.etree
4886 lxml.sax.ElementTreeContentHandler.etree
4887 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4888 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4889 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1687', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1688" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1688', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
4890 <a name="L1454"></a><tt class="py-lineno">1454</tt> <tt class="py-line"> <tt id="link-1689" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-1689', 'Comment', 'link-418');">Comment</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1690" class="py-name"><a title="lxml.etree
4891 lxml.sax.ElementTreeContentHandler.etree
4892 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4893 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4894 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1690', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1691" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-1691', 'Comment', 'link-418');">Comment</a></tt> </tt>
4895 <a name="L1455"></a><tt class="py-lineno">1455</tt> <tt class="py-line"> <tt id="link-1692" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1692', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-1693" class="py-name"><a title="lxml.cssselect.Element
4898 lxml.objectify.Element
4899 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4900 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1693', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'root'</tt><tt class="py-op">)</tt> </tt>
4901 <a name="L1456"></a><tt class="py-lineno">1456</tt> <tt class="py-line"> <tt id="link-1694" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1694', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt id="link-1695" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1695', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
4902 <a name="L1457"></a><tt class="py-lineno">1457</tt> <tt class="py-line"> <tt id="link-1696" class="py-name" targets="Method lxml.etree.TreeBuilder.comment()=lxml.etree.TreeBuilder-class.html#comment"><a title="lxml.etree.TreeBuilder.comment" class="py-name" href="#" onclick="return doclink('link-1696', 'comment', 'link-1696');">comment</a></tt> <tt class="py-op">=</tt> <tt id="link-1697" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-1697', 'Comment', 'link-418');">Comment</a></tt><tt class="py-op">(</tt><tt class="py-string">'TEXT '</tt><tt class="py-op">)</tt> </tt>
4903 <a name="L1458"></a><tt class="py-lineno">1458</tt> <tt class="py-line"> <tt id="link-1698" class="py-name"><a title="lxml.etree.TreeBuilder.comment" class="py-name" href="#" onclick="return doclink('link-1698', 'comment', 'link-1696');">comment</a></tt><tt class="py-op">.</tt><tt id="link-1699" class="py-name"><a title="lxml.etree._Element.tail
4904 lxml.etree._ReadOnlyProxy.tail
4905 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-1699', 'tail', 'link-850');">tail</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"TAIL"</tt> </tt>
4906 <a name="L1459"></a><tt class="py-lineno">1459</tt> <tt class="py-line"> </tt>
4907 <a name="L1460"></a><tt class="py-lineno">1460</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1700" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1700', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root><a></a></root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
4908 <a name="L1461"></a><tt class="py-lineno">1461</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1701" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
4909 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-1701', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-1702" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1702', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4910 <a name="L1462"></a><tt class="py-lineno">1462</tt> <tt class="py-line"> <tt id="link-1703" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1703', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1704" class="py-name"><a title="lxml.etree._Element.addnext" class="py-name" href="#" onclick="return doclink('link-1704', 'addnext', 'link-1554');">addnext</a></tt><tt class="py-op">(</tt><tt id="link-1705" class="py-name"><a title="lxml.etree.TreeBuilder.comment" class="py-name" href="#" onclick="return doclink('link-1705', 'comment', 'link-1696');">comment</a></tt><tt class="py-op">)</tt> </tt>
4911 <a name="L1463"></a><tt class="py-lineno">1463</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1706" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1706', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root><a></a><!--TEXT -->TAIL</root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
4912 <a name="L1464"></a><tt class="py-lineno">1464</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1707" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
4913 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-1707', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-1708" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1708', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4914 </div><a name="L1465"></a><tt class="py-lineno">1465</tt> <tt class="py-line"> </tt>
4915 <a name="ETreeOnlyTestCase.test_addnext_root_comment"></a><div id="ETreeOnlyTestCase.test_addnext_root_comment-def"><a name="L1466"></a><tt class="py-lineno">1466</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_addnext_root_comment-toggle" onclick="return toggle('ETreeOnlyTestCase.test_addnext_root_comment');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addnext_root_comment">test_addnext_root_comment</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4916 </div><div id="ETreeOnlyTestCase.test_addnext_root_comment-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_addnext_root_comment-expanded"><a name="L1467"></a><tt class="py-lineno">1467</tt> <tt class="py-line"> <tt id="link-1709" class="py-name"><a title="lxml.cssselect.Element
4919 lxml.objectify.Element
4920 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4921 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1709', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1710" class="py-name"><a title="lxml.etree
4922 lxml.sax.ElementTreeContentHandler.etree
4923 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4924 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4925 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1710', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1711" class="py-name"><a title="lxml.cssselect.Element
4928 lxml.objectify.Element
4929 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4930 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1711', 'Element', 'link-69');">Element</a></tt> </tt>
4931 <a name="L1468"></a><tt class="py-lineno">1468</tt> <tt class="py-line"> <tt id="link-1712" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-1712', 'Comment', 'link-418');">Comment</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1713" class="py-name"><a title="lxml.etree
4932 lxml.sax.ElementTreeContentHandler.etree
4933 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4934 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4935 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1713', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1714" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-1714', 'Comment', 'link-418');">Comment</a></tt> </tt>
4936 <a name="L1469"></a><tt class="py-lineno">1469</tt> <tt class="py-line"> <tt id="link-1715" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1715', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-1716" class="py-name"><a title="lxml.cssselect.Element
4939 lxml.objectify.Element
4940 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4941 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1716', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'root'</tt><tt class="py-op">)</tt> </tt>
4942 <a name="L1470"></a><tt class="py-lineno">1470</tt> <tt class="py-line"> <tt id="link-1717" class="py-name"><a title="lxml.etree.TreeBuilder.comment" class="py-name" href="#" onclick="return doclink('link-1717', 'comment', 'link-1696');">comment</a></tt> <tt class="py-op">=</tt> <tt id="link-1718" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-1718', 'Comment', 'link-418');">Comment</a></tt><tt class="py-op">(</tt><tt class="py-string">'TEXT '</tt><tt class="py-op">)</tt> </tt>
4943 <a name="L1471"></a><tt class="py-lineno">1471</tt> <tt class="py-line"> <tt id="link-1719" class="py-name"><a title="lxml.etree.TreeBuilder.comment" class="py-name" href="#" onclick="return doclink('link-1719', 'comment', 'link-1696');">comment</a></tt><tt class="py-op">.</tt><tt id="link-1720" class="py-name"><a title="lxml.etree._Element.tail
4944 lxml.etree._ReadOnlyProxy.tail
4945 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-1720', 'tail', 'link-850');">tail</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"TAIL"</tt> </tt>
4946 <a name="L1472"></a><tt class="py-lineno">1472</tt> <tt class="py-line"> </tt>
4947 <a name="L1473"></a><tt class="py-lineno">1473</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1721" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1721', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root></root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
4948 <a name="L1474"></a><tt class="py-lineno">1474</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1722" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
4949 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-1722', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-1723" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1723', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4950 <a name="L1475"></a><tt class="py-lineno">1475</tt> <tt class="py-line"> <tt id="link-1724" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1724', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1725" class="py-name"><a title="lxml.etree._Element.addnext" class="py-name" href="#" onclick="return doclink('link-1725', 'addnext', 'link-1554');">addnext</a></tt><tt class="py-op">(</tt><tt id="link-1726" class="py-name"><a title="lxml.etree.TreeBuilder.comment" class="py-name" href="#" onclick="return doclink('link-1726', 'comment', 'link-1696');">comment</a></tt><tt class="py-op">)</tt> </tt>
4951 <a name="L1476"></a><tt class="py-lineno">1476</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1727" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1727', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root></root>\n<!--TEXT -->'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
4952 <a name="L1477"></a><tt class="py-lineno">1477</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1728" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
4953 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-1728', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-1729" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1729', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4954 </div><a name="L1478"></a><tt class="py-lineno">1478</tt> <tt class="py-line"> </tt>
4955 <a name="ETreeOnlyTestCase.test_addprevious_comment"></a><div id="ETreeOnlyTestCase.test_addprevious_comment-def"><a name="L1479"></a><tt class="py-lineno">1479</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_addprevious_comment-toggle" onclick="return toggle('ETreeOnlyTestCase.test_addprevious_comment');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addprevious_comment">test_addprevious_comment</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
4956 </div><div id="ETreeOnlyTestCase.test_addprevious_comment-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_addprevious_comment-expanded"><a name="L1480"></a><tt class="py-lineno">1480</tt> <tt class="py-line"> <tt id="link-1730" class="py-name"><a title="lxml.cssselect.Element
4959 lxml.objectify.Element
4960 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4961 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1730', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1731" class="py-name"><a title="lxml.etree
4962 lxml.sax.ElementTreeContentHandler.etree
4963 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4964 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4965 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1731', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1732" class="py-name"><a title="lxml.cssselect.Element
4968 lxml.objectify.Element
4969 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4970 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1732', 'Element', 'link-69');">Element</a></tt> </tt>
4971 <a name="L1481"></a><tt class="py-lineno">1481</tt> <tt class="py-line"> <tt id="link-1733" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1733', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1734" class="py-name"><a title="lxml.etree
4972 lxml.sax.ElementTreeContentHandler.etree
4973 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4974 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4975 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1734', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1735" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1735', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
4976 <a name="L1482"></a><tt class="py-lineno">1482</tt> <tt class="py-line"> <tt id="link-1736" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-1736', 'Comment', 'link-418');">Comment</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1737" class="py-name"><a title="lxml.etree
4977 lxml.sax.ElementTreeContentHandler.etree
4978 lxml.tests.test_elementtree.CElementTreeTestCase.etree
4979 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
4980 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1737', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1738" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-1738', 'Comment', 'link-418');">Comment</a></tt> </tt>
4981 <a name="L1483"></a><tt class="py-lineno">1483</tt> <tt class="py-line"> <tt id="link-1739" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1739', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-1740" class="py-name"><a title="lxml.cssselect.Element
4984 lxml.objectify.Element
4985 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
4986 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1740', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'root'</tt><tt class="py-op">)</tt> </tt>
4987 <a name="L1484"></a><tt class="py-lineno">1484</tt> <tt class="py-line"> <tt id="link-1741" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1741', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt id="link-1742" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1742', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
4988 <a name="L1485"></a><tt class="py-lineno">1485</tt> <tt class="py-line"> <tt id="link-1743" class="py-name"><a title="lxml.etree.TreeBuilder.comment" class="py-name" href="#" onclick="return doclink('link-1743', 'comment', 'link-1696');">comment</a></tt> <tt class="py-op">=</tt> <tt id="link-1744" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-1744', 'Comment', 'link-418');">Comment</a></tt><tt class="py-op">(</tt><tt class="py-string">'TEXT '</tt><tt class="py-op">)</tt> </tt>
4989 <a name="L1486"></a><tt class="py-lineno">1486</tt> <tt class="py-line"> <tt id="link-1745" class="py-name"><a title="lxml.etree.TreeBuilder.comment" class="py-name" href="#" onclick="return doclink('link-1745', 'comment', 'link-1696');">comment</a></tt><tt class="py-op">.</tt><tt id="link-1746" class="py-name"><a title="lxml.etree._Element.tail
4990 lxml.etree._ReadOnlyProxy.tail
4991 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-1746', 'tail', 'link-850');">tail</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"TAIL"</tt> </tt>
4992 <a name="L1487"></a><tt class="py-lineno">1487</tt> <tt class="py-line"> </tt>
4993 <a name="L1488"></a><tt class="py-lineno">1488</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1747" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1747', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root><a></a></root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
4994 <a name="L1489"></a><tt class="py-lineno">1489</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1748" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
4995 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-1748', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-1749" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1749', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
4996 <a name="L1490"></a><tt class="py-lineno">1490</tt> <tt class="py-line"> <tt id="link-1750" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1750', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1751" class="py-name"><a title="lxml.etree._Element.addprevious" class="py-name" href="#" onclick="return doclink('link-1751', 'addprevious', 'link-1573');">addprevious</a></tt><tt class="py-op">(</tt><tt id="link-1752" class="py-name"><a title="lxml.etree.TreeBuilder.comment" class="py-name" href="#" onclick="return doclink('link-1752', 'comment', 'link-1696');">comment</a></tt><tt class="py-op">)</tt> </tt>
4997 <a name="L1491"></a><tt class="py-lineno">1491</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1753" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1753', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root><!--TEXT -->TAIL<a></a></root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
4998 <a name="L1492"></a><tt class="py-lineno">1492</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1754" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
4999 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-1754', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-1755" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1755', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5000 </div><a name="L1493"></a><tt class="py-lineno">1493</tt> <tt class="py-line"> </tt>
5001 <a name="ETreeOnlyTestCase.test_addprevious_root_comment"></a><div id="ETreeOnlyTestCase.test_addprevious_root_comment-def"><a name="L1494"></a><tt class="py-lineno">1494</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_addprevious_root_comment-toggle" onclick="return toggle('ETreeOnlyTestCase.test_addprevious_root_comment');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addprevious_root_comment">test_addprevious_root_comment</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5002 </div><div id="ETreeOnlyTestCase.test_addprevious_root_comment-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_addprevious_root_comment-expanded"><a name="L1495"></a><tt class="py-lineno">1495</tt> <tt class="py-line"> <tt id="link-1756" class="py-name"><a title="lxml.cssselect.Element
5005 lxml.objectify.Element
5006 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5007 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1756', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1757" class="py-name"><a title="lxml.etree
5008 lxml.sax.ElementTreeContentHandler.etree
5009 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5010 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5011 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1757', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1758" class="py-name"><a title="lxml.cssselect.Element
5014 lxml.objectify.Element
5015 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5016 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1758', 'Element', 'link-69');">Element</a></tt> </tt>
5017 <a name="L1496"></a><tt class="py-lineno">1496</tt> <tt class="py-line"> <tt id="link-1759" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-1759', 'Comment', 'link-418');">Comment</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1760" class="py-name"><a title="lxml.etree
5018 lxml.sax.ElementTreeContentHandler.etree
5019 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5020 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5021 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1760', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1761" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-1761', 'Comment', 'link-418');">Comment</a></tt> </tt>
5022 <a name="L1497"></a><tt class="py-lineno">1497</tt> <tt class="py-line"> <tt id="link-1762" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1762', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-1763" class="py-name"><a title="lxml.cssselect.Element
5025 lxml.objectify.Element
5026 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5027 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1763', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'root'</tt><tt class="py-op">)</tt> </tt>
5028 <a name="L1498"></a><tt class="py-lineno">1498</tt> <tt class="py-line"> <tt id="link-1764" class="py-name"><a title="lxml.etree.TreeBuilder.comment" class="py-name" href="#" onclick="return doclink('link-1764', 'comment', 'link-1696');">comment</a></tt> <tt class="py-op">=</tt> <tt id="link-1765" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-1765', 'Comment', 'link-418');">Comment</a></tt><tt class="py-op">(</tt><tt class="py-string">'TEXT '</tt><tt class="py-op">)</tt> </tt>
5029 <a name="L1499"></a><tt class="py-lineno">1499</tt> <tt class="py-line"> <tt id="link-1766" class="py-name"><a title="lxml.etree.TreeBuilder.comment" class="py-name" href="#" onclick="return doclink('link-1766', 'comment', 'link-1696');">comment</a></tt><tt class="py-op">.</tt><tt id="link-1767" class="py-name"><a title="lxml.etree._Element.tail
5030 lxml.etree._ReadOnlyProxy.tail
5031 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-1767', 'tail', 'link-850');">tail</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"TAIL"</tt> </tt>
5032 <a name="L1500"></a><tt class="py-lineno">1500</tt> <tt class="py-line"> </tt>
5033 <a name="L1501"></a><tt class="py-lineno">1501</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1768" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1768', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root></root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
5034 <a name="L1502"></a><tt class="py-lineno">1502</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1769" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
5035 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-1769', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-1770" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1770', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5036 <a name="L1503"></a><tt class="py-lineno">1503</tt> <tt class="py-line"> <tt id="link-1771" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1771', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1772" class="py-name"><a title="lxml.etree._Element.addprevious" class="py-name" href="#" onclick="return doclink('link-1772', 'addprevious', 'link-1573');">addprevious</a></tt><tt class="py-op">(</tt><tt id="link-1773" class="py-name"><a title="lxml.etree.TreeBuilder.comment" class="py-name" href="#" onclick="return doclink('link-1773', 'comment', 'link-1696');">comment</a></tt><tt class="py-op">)</tt> </tt>
5037 <a name="L1504"></a><tt class="py-lineno">1504</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-1774" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1774', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!--TEXT -->\n<root></root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
5038 <a name="L1505"></a><tt class="py-lineno">1505</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1775" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
5039 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-1775', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-1776" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1776', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5040 </div><a name="L1506"></a><tt class="py-lineno">1506</tt> <tt class="py-line"> </tt>
5041 <a name="L1507"></a><tt class="py-lineno">1507</tt> <tt class="py-line"> <tt class="py-comment"># ET's Elements have items() and key(), but not values()</tt> </tt>
5042 <a name="ETreeOnlyTestCase.test_attribute_values"></a><div id="ETreeOnlyTestCase.test_attribute_values-def"><a name="L1508"></a><tt class="py-lineno">1508</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_attribute_values-toggle" onclick="return toggle('ETreeOnlyTestCase.test_attribute_values');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_attribute_values">test_attribute_values</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5043 </div><div id="ETreeOnlyTestCase.test_attribute_values-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_attribute_values-expanded"><a name="L1509"></a><tt class="py-lineno">1509</tt> <tt class="py-line"> <tt id="link-1777" class="py-name"><a title="lxml.etree.XML
5045 lxml.tests.test_objectify.ObjectifyTestCase.XML
5046 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1777', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1778" class="py-name"><a title="lxml.etree
5047 lxml.sax.ElementTreeContentHandler.etree
5048 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5049 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5050 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1778', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1779" class="py-name"><a title="lxml.etree.XML
5052 lxml.tests.test_objectify.ObjectifyTestCase.XML
5053 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1779', 'XML', 'link-217');">XML</a></tt> </tt>
5054 <a name="L1510"></a><tt class="py-lineno">1510</tt> <tt class="py-line"> </tt>
5055 <a name="L1511"></a><tt class="py-lineno">1511</tt> <tt class="py-line"> <tt id="link-1780" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1780', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-1781" class="py-name"><a title="lxml.etree.XML
5057 lxml.tests.test_objectify.ObjectifyTestCase.XML
5058 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1781', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-1782" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1782', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<doc alpha="Alpha" beta="Beta" gamma="Gamma"/>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5059 <a name="L1512"></a><tt class="py-lineno">1512</tt> <tt class="py-line"> <tt id="link-1783" class="py-name" targets="Method lxml.etree._Attrib.values()=lxml.etree._Attrib-class.html#values,Method lxml.etree._Element.values()=lxml.etree._Element-class.html#values,Method lxml.etree._IDDict.values()=lxml.etree._IDDict-class.html#values,Method lxml.etree._ReadOnlyElementProxy.values()=lxml.etree._ReadOnlyElementProxy-class.html#values,Method lxml.etree.__ContentOnlyElement.values()=lxml.etree.__ContentOnlyElement-class.html#values"><a title="lxml.etree._Attrib.values
5060 lxml.etree._Element.values
5061 lxml.etree._IDDict.values
5062 lxml.etree._ReadOnlyElementProxy.values
5063 lxml.etree.__ContentOnlyElement.values" class="py-name" href="#" onclick="return doclink('link-1783', 'values', 'link-1783');">values</a></tt> <tt class="py-op">=</tt> <tt id="link-1784" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1784', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1785" class="py-name"><a title="lxml.etree._Attrib.values
5064 lxml.etree._Element.values
5065 lxml.etree._IDDict.values
5066 lxml.etree._ReadOnlyElementProxy.values
5067 lxml.etree.__ContentOnlyElement.values" class="py-name" href="#" onclick="return doclink('link-1785', 'values', 'link-1783');">values</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
5068 <a name="L1513"></a><tt class="py-lineno">1513</tt> <tt class="py-line"> <tt id="link-1786" class="py-name"><a title="lxml.etree._Attrib.values
5069 lxml.etree._Element.values
5070 lxml.etree._IDDict.values
5071 lxml.etree._ReadOnlyElementProxy.values
5072 lxml.etree.__ContentOnlyElement.values" class="py-name" href="#" onclick="return doclink('link-1786', 'values', 'link-1783');">values</a></tt><tt class="py-op">.</tt><tt class="py-name">sort</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
5073 <a name="L1514"></a><tt class="py-lineno">1514</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'Alpha'</tt><tt class="py-op">,</tt> <tt class="py-string">'Beta'</tt><tt class="py-op">,</tt> <tt class="py-string">'Gamma'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt id="link-1787" class="py-name"><a title="lxml.etree._Attrib.values
5074 lxml.etree._Element.values
5075 lxml.etree._IDDict.values
5076 lxml.etree._ReadOnlyElementProxy.values
5077 lxml.etree.__ContentOnlyElement.values" class="py-name" href="#" onclick="return doclink('link-1787', 'values', 'link-1783');">values</a></tt><tt class="py-op">)</tt> </tt>
5078 </div><a name="L1515"></a><tt class="py-lineno">1515</tt> <tt class="py-line"> </tt>
5079 <a name="L1516"></a><tt class="py-lineno">1516</tt> <tt class="py-line"> <tt class="py-comment"># gives error in ElementTree</tt> </tt>
5080 <a name="ETreeOnlyTestCase.test_comment_empty"></a><div id="ETreeOnlyTestCase.test_comment_empty-def"><a name="L1517"></a><tt class="py-lineno">1517</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_comment_empty-toggle" onclick="return toggle('ETreeOnlyTestCase.test_comment_empty');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_comment_empty">test_comment_empty</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5081 </div><div id="ETreeOnlyTestCase.test_comment_empty-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_comment_empty-expanded"><a name="L1518"></a><tt class="py-lineno">1518</tt> <tt class="py-line"> <tt id="link-1788" class="py-name"><a title="lxml.cssselect.Element
5084 lxml.objectify.Element
5085 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5086 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1788', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1789" class="py-name"><a title="lxml.etree
5087 lxml.sax.ElementTreeContentHandler.etree
5088 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5089 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5090 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1789', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1790" class="py-name"><a title="lxml.cssselect.Element
5093 lxml.objectify.Element
5094 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5095 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1790', 'Element', 'link-69');">Element</a></tt> </tt>
5096 <a name="L1519"></a><tt class="py-lineno">1519</tt> <tt class="py-line"> <tt id="link-1791" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-1791', 'Comment', 'link-418');">Comment</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1792" class="py-name"><a title="lxml.etree
5097 lxml.sax.ElementTreeContentHandler.etree
5098 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5099 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5100 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1792', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1793" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-1793', 'Comment', 'link-418');">Comment</a></tt> </tt>
5101 <a name="L1520"></a><tt class="py-lineno">1520</tt> <tt class="py-line"> </tt>
5102 <a name="L1521"></a><tt class="py-lineno">1521</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-1794" class="py-name"><a title="lxml.cssselect.Element
5105 lxml.objectify.Element
5106 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5107 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1794', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
5108 <a name="L1522"></a><tt class="py-lineno">1522</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-1795" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
5109 lxml.etree._Element.append
5110 lxml.etree._OpaqueDocumentWrapper.append
5111 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1795', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt id="link-1796" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-1796', 'Comment', 'link-418');">Comment</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5112 <a name="L1523"></a><tt class="py-lineno">1523</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5113 <a name="L1524"></a><tt class="py-lineno">1524</tt> <tt class="py-line"> <tt id="link-1797" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1797', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><!----></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
5114 <a name="L1525"></a><tt class="py-lineno">1525</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1798" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
5115 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-1798', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5116 </div><a name="L1526"></a><tt class="py-lineno">1526</tt> <tt class="py-line"> </tt>
5117 <a name="L1527"></a><tt class="py-lineno">1527</tt> <tt class="py-line"> <tt class="py-comment"># ElementTree ignores comments</tt> </tt>
5118 <a name="ETreeOnlyTestCase.test_comment_parse_empty"></a><div id="ETreeOnlyTestCase.test_comment_parse_empty-def"><a name="L1528"></a><tt class="py-lineno">1528</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_comment_parse_empty-toggle" onclick="return toggle('ETreeOnlyTestCase.test_comment_parse_empty');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_comment_parse_empty">test_comment_parse_empty</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5119 </div><div id="ETreeOnlyTestCase.test_comment_parse_empty-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_comment_parse_empty-expanded"><a name="L1529"></a><tt class="py-lineno">1529</tt> <tt class="py-line"> <tt id="link-1799" class="py-name"><a title="lxml.etree.ElementTree
5120 xml.etree.ElementTree
5121 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-1799', 'ElementTree', 'link-468');">ElementTree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1800" class="py-name"><a title="lxml.etree
5122 lxml.sax.ElementTreeContentHandler.etree
5123 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5124 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5125 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1800', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1801" class="py-name"><a title="lxml.etree.ElementTree
5126 xml.etree.ElementTree
5127 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-1801', 'ElementTree', 'link-468');">ElementTree</a></tt> </tt>
5128 <a name="L1530"></a><tt class="py-lineno">1530</tt> <tt class="py-line"> <tt id="link-1802" class="py-name"><a title="lxml.etree.XSLT.tostring
5130 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-1802', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1803" class="py-name"><a title="lxml.etree
5131 lxml.sax.ElementTreeContentHandler.etree
5132 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5133 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5134 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1803', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1804" class="py-name"><a title="lxml.etree.XSLT.tostring
5136 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-1804', 'tostring', 'link-597');">tostring</a></tt> </tt>
5137 <a name="L1531"></a><tt class="py-lineno">1531</tt> <tt class="py-line"> </tt>
5138 <a name="L1532"></a><tt class="py-lineno">1532</tt> <tt class="py-line"> <tt id="link-1805" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1805', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-1806" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1806', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b/><!----><c/></a>'</tt><tt class="py-op">)</tt> </tt>
5139 <a name="L1533"></a><tt class="py-lineno">1533</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt id="link-1807" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1807', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
5140 <a name="L1534"></a><tt class="py-lineno">1534</tt> <tt class="py-line"> <tt class="py-name">doc</tt> <tt class="py-op">=</tt> <tt id="link-1808" class="py-name"><a title="lxml.etree.ElementTree
5141 xml.etree.ElementTree
5142 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-1808', 'ElementTree', 'link-468');">ElementTree</a></tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">=</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
5143 <a name="L1535"></a><tt class="py-lineno">1535</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt class="py-name">doc</tt><tt class="py-op">.</tt><tt id="link-1809" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-1809', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
5144 <a name="L1536"></a><tt class="py-lineno">1536</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5145 <a name="L1537"></a><tt class="py-lineno">1537</tt> <tt class="py-line"> <tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
5146 <a name="L1538"></a><tt class="py-lineno">1538</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1810" class="py-name"><a title="lxml.etree.QName.text
5147 lxml.etree._AppendOnlyElementProxy.text
5148 lxml.etree._Element.text
5149 lxml.etree._Entity.text
5150 lxml.etree._ModifyContentOnlyProxy.text
5151 lxml.etree._ReadOnlyEntityProxy.text
5152 lxml.etree._ReadOnlyProxy.text
5153 lxml.etree.__ContentOnlyElement.text
5154 lxml.objectify.ObjectifiedElement.text
5155 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-1810', 'text', 'link-194');">text</a></tt><tt class="py-op">)</tt> </tt>
5156 <a name="L1539"></a><tt class="py-lineno">1539</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5157 <a name="L1540"></a><tt class="py-lineno">1540</tt> <tt class="py-line"> <tt id="link-1811" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-1811', 'xml', 'link-256');">xml</a></tt><tt class="py-op">,</tt> </tt>
5158 <a name="L1541"></a><tt class="py-lineno">1541</tt> <tt class="py-line"> <tt id="link-1812" class="py-name"><a title="lxml.etree.XSLT.tostring
5160 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-1812', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5161 </div><a name="L1542"></a><tt class="py-lineno">1542</tt> <tt class="py-line"> </tt>
5162 <a name="L1543"></a><tt class="py-lineno">1543</tt> <tt class="py-line"> <tt class="py-comment"># ElementTree ignores comments</tt> </tt>
5163 <a name="ETreeOnlyTestCase.test_comment_no_proxy_yet"></a><div id="ETreeOnlyTestCase.test_comment_no_proxy_yet-def"><a name="L1544"></a><tt class="py-lineno">1544</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_comment_no_proxy_yet-toggle" onclick="return toggle('ETreeOnlyTestCase.test_comment_no_proxy_yet');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_comment_no_proxy_yet">test_comment_no_proxy_yet</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5164 </div><div id="ETreeOnlyTestCase.test_comment_no_proxy_yet-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_comment_no_proxy_yet-expanded"><a name="L1545"></a><tt class="py-lineno">1545</tt> <tt class="py-line"> <tt id="link-1813" class="py-name"><a title="lxml.etree.ElementTree
5165 xml.etree.ElementTree
5166 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-1813', 'ElementTree', 'link-468');">ElementTree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1814" class="py-name"><a title="lxml.etree
5167 lxml.sax.ElementTreeContentHandler.etree
5168 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5169 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5170 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1814', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1815" class="py-name"><a title="lxml.etree.ElementTree
5171 xml.etree.ElementTree
5172 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-1815', 'ElementTree', 'link-468');">ElementTree</a></tt> </tt>
5173 <a name="L1546"></a><tt class="py-lineno">1546</tt> <tt class="py-line"> </tt>
5174 <a name="L1547"></a><tt class="py-lineno">1547</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-string">'<a><b></b><!-- hoi --><c></c></a>'</tt><tt class="py-op">)</tt> </tt>
5175 <a name="L1548"></a><tt class="py-lineno">1548</tt> <tt class="py-line"> <tt class="py-name">doc</tt> <tt class="py-op">=</tt> <tt id="link-1816" class="py-name"><a title="lxml.etree.ElementTree
5176 xml.etree.ElementTree
5177 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-1816', 'ElementTree', 'link-468');">ElementTree</a></tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">=</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
5178 <a name="L1549"></a><tt class="py-lineno">1549</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt class="py-name">doc</tt><tt class="py-op">.</tt><tt id="link-1817" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-1817', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
5179 <a name="L1550"></a><tt class="py-lineno">1550</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5180 <a name="L1551"></a><tt class="py-lineno">1551</tt> <tt class="py-line"> <tt class="py-string">' hoi '</tt><tt class="py-op">,</tt> </tt>
5181 <a name="L1552"></a><tt class="py-lineno">1552</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1818" class="py-name"><a title="lxml.etree.QName.text
5182 lxml.etree._AppendOnlyElementProxy.text
5183 lxml.etree._Element.text
5184 lxml.etree._Entity.text
5185 lxml.etree._ModifyContentOnlyProxy.text
5186 lxml.etree._ReadOnlyEntityProxy.text
5187 lxml.etree._ReadOnlyProxy.text
5188 lxml.etree.__ContentOnlyElement.text
5189 lxml.objectify.ObjectifiedElement.text
5190 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-1818', 'text', 'link-194');">text</a></tt><tt class="py-op">)</tt> </tt>
5191 </div><a name="L1553"></a><tt class="py-lineno">1553</tt> <tt class="py-line"> </tt>
5192 <a name="L1554"></a><tt class="py-lineno">1554</tt> <tt class="py-line"> <tt class="py-comment"># does not raise an exception in ElementTree</tt> </tt>
5193 <a name="ETreeOnlyTestCase.test_comment_immutable"></a><div id="ETreeOnlyTestCase.test_comment_immutable-def"><a name="L1555"></a><tt class="py-lineno">1555</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_comment_immutable-toggle" onclick="return toggle('ETreeOnlyTestCase.test_comment_immutable');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_comment_immutable">test_comment_immutable</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5194 </div><div id="ETreeOnlyTestCase.test_comment_immutable-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_comment_immutable-expanded"><a name="L1556"></a><tt class="py-lineno">1556</tt> <tt class="py-line"> <tt id="link-1819" class="py-name"><a title="lxml.cssselect.Element
5197 lxml.objectify.Element
5198 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5199 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1819', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1820" class="py-name"><a title="lxml.etree
5200 lxml.sax.ElementTreeContentHandler.etree
5201 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5202 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5203 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1820', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1821" class="py-name"><a title="lxml.cssselect.Element
5206 lxml.objectify.Element
5207 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5208 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1821', 'Element', 'link-69');">Element</a></tt> </tt>
5209 <a name="L1557"></a><tt class="py-lineno">1557</tt> <tt class="py-line"> <tt id="link-1822" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-1822', 'Comment', 'link-418');">Comment</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1823" class="py-name"><a title="lxml.etree
5210 lxml.sax.ElementTreeContentHandler.etree
5211 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5212 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5213 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1823', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1824" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-1824', 'Comment', 'link-418');">Comment</a></tt> </tt>
5214 <a name="L1558"></a><tt class="py-lineno">1558</tt> <tt class="py-line"> </tt>
5215 <a name="L1559"></a><tt class="py-lineno">1559</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-1825" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-1825', 'Comment', 'link-418');">Comment</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
5216 <a name="L1560"></a><tt class="py-lineno">1560</tt> <tt class="py-line"> <tt class="py-name">el</tt> <tt class="py-op">=</tt> <tt id="link-1826" class="py-name"><a title="lxml.cssselect.Element
5219 lxml.objectify.Element
5220 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5221 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1826', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'myel'</tt><tt class="py-op">)</tt> </tt>
5222 <a name="L1561"></a><tt class="py-lineno">1561</tt> <tt class="py-line"> </tt>
5223 <a name="L1562"></a><tt class="py-lineno">1562</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">TypeError</tt><tt class="py-op">,</tt> <tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-1827" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
5224 lxml.etree._Element.append
5225 lxml.etree._OpaqueDocumentWrapper.append
5226 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1827', 'append', 'link-621');">append</a></tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">)</tt> </tt>
5227 <a name="L1563"></a><tt class="py-lineno">1563</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">TypeError</tt><tt class="py-op">,</tt> <tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-1828" class="py-name"><a title="lxml.etree._Element.insert
5228 lxml.etree.__ContentOnlyElement.insert" class="py-name" href="#" onclick="return doclink('link-1828', 'insert', 'link-7');">insert</a></tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">)</tt> </tt>
5229 <a name="L1564"></a><tt class="py-lineno">1564</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">TypeError</tt><tt class="py-op">,</tt> <tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-1829" class="py-name"><a title="lxml.etree._Element.set
5230 lxml.etree._XSLTProcessingInstruction.set
5231 lxml.etree.__ContentOnlyElement.set" class="py-name" href="#" onclick="return doclink('link-1829', 'set', 'link-241');">set</a></tt><tt class="py-op">,</tt> <tt class="py-string">"myattr"</tt><tt class="py-op">,</tt> <tt class="py-string">"test"</tt><tt class="py-op">)</tt> </tt>
5232 </div><a name="L1565"></a><tt class="py-lineno">1565</tt> <tt class="py-line"> </tt>
5233 <a name="L1566"></a><tt class="py-lineno">1566</tt> <tt class="py-line"> <tt class="py-comment"># test passing 'None' to dump</tt> </tt>
5234 <a name="ETreeOnlyTestCase.test_dump_none"></a><div id="ETreeOnlyTestCase.test_dump_none-def"><a name="L1567"></a><tt class="py-lineno">1567</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_dump_none-toggle" onclick="return toggle('ETreeOnlyTestCase.test_dump_none');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_dump_none">test_dump_none</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5235 </div><div id="ETreeOnlyTestCase.test_dump_none-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_dump_none-expanded"><a name="L1568"></a><tt class="py-lineno">1568</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">TypeError</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1830" class="py-name"><a title="lxml.etree
5236 lxml.sax.ElementTreeContentHandler.etree
5237 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5238 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5239 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1830', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1831" class="py-name" targets="Function lxml.etree.dump()=lxml.etree-module.html#dump,Function lxml.objectify.dump()=lxml.objectify-module.html#dump"><a title="lxml.etree.dump
5240 lxml.objectify.dump" class="py-name" href="#" onclick="return doclink('link-1831', 'dump', 'link-1831');">dump</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
5241 </div><a name="L1569"></a><tt class="py-lineno">1569</tt> <tt class="py-line"> </tt>
5242 <a name="ETreeOnlyTestCase.test_prefix"></a><div id="ETreeOnlyTestCase.test_prefix-def"><a name="L1570"></a><tt class="py-lineno">1570</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_prefix-toggle" onclick="return toggle('ETreeOnlyTestCase.test_prefix');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_prefix">test_prefix</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5243 </div><div id="ETreeOnlyTestCase.test_prefix-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_prefix-expanded"><a name="L1571"></a><tt class="py-lineno">1571</tt> <tt class="py-line"> <tt id="link-1832" class="py-name"><a title="lxml.etree.ElementTree
5244 xml.etree.ElementTree
5245 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-1832', 'ElementTree', 'link-468');">ElementTree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1833" class="py-name"><a title="lxml.etree
5246 lxml.sax.ElementTreeContentHandler.etree
5247 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5248 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5249 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1833', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1834" class="py-name"><a title="lxml.etree.ElementTree
5250 xml.etree.ElementTree
5251 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-1834', 'ElementTree', 'link-468');">ElementTree</a></tt> </tt>
5252 <a name="L1572"></a><tt class="py-lineno">1572</tt> <tt class="py-line"> </tt>
5253 <a name="L1573"></a><tt class="py-lineno">1573</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-string">'<a xmlns:foo="http://www.infrae.com/ns/1"><foo:b/></a>'</tt><tt class="py-op">)</tt> </tt>
5254 <a name="L1574"></a><tt class="py-lineno">1574</tt> <tt class="py-line"> <tt class="py-name">doc</tt> <tt class="py-op">=</tt> <tt id="link-1835" class="py-name"><a title="lxml.etree.ElementTree
5255 xml.etree.ElementTree
5256 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-1835', 'ElementTree', 'link-468');">ElementTree</a></tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">=</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
5257 <a name="L1575"></a><tt class="py-lineno">1575</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt class="py-name">doc</tt><tt class="py-op">.</tt><tt id="link-1836" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-1836', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
5258 <a name="L1576"></a><tt class="py-lineno">1576</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5259 <a name="L1577"></a><tt class="py-lineno">1577</tt> <tt class="py-line"> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
5260 <a name="L1578"></a><tt class="py-lineno">1578</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-1837" class="py-name" targets="Variable lxml.etree._Element.prefix=lxml.etree._Element-class.html#prefix,Variable lxml.etree._ReadOnlyElementProxy.prefix=lxml.etree._ReadOnlyElementProxy-class.html#prefix,Variable lxml.etree._XPathFunctionNamespaceRegistry.prefix=lxml.etree._XPathFunctionNamespaceRegistry-class.html#prefix"><a title="lxml.etree._Element.prefix
5261 lxml.etree._ReadOnlyElementProxy.prefix
5262 lxml.etree._XPathFunctionNamespaceRegistry.prefix" class="py-name" href="#" onclick="return doclink('link-1837', 'prefix', 'link-1837');">prefix</a></tt><tt class="py-op">)</tt> </tt>
5263 <a name="L1579"></a><tt class="py-lineno">1579</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5264 <a name="L1580"></a><tt class="py-lineno">1580</tt> <tt class="py-line"> <tt class="py-string">'foo'</tt><tt class="py-op">,</tt> </tt>
5265 <a name="L1581"></a><tt class="py-lineno">1581</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1838" class="py-name"><a title="lxml.etree._Element.prefix
5266 lxml.etree._ReadOnlyElementProxy.prefix
5267 lxml.etree._XPathFunctionNamespaceRegistry.prefix" class="py-name" href="#" onclick="return doclink('link-1838', 'prefix', 'link-1837');">prefix</a></tt><tt class="py-op">)</tt> </tt>
5268 </div><a name="L1582"></a><tt class="py-lineno">1582</tt> <tt class="py-line"> </tt>
5269 <a name="ETreeOnlyTestCase.test_prefix_default_ns"></a><div id="ETreeOnlyTestCase.test_prefix_default_ns-def"><a name="L1583"></a><tt class="py-lineno">1583</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_prefix_default_ns-toggle" onclick="return toggle('ETreeOnlyTestCase.test_prefix_default_ns');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_prefix_default_ns">test_prefix_default_ns</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5270 </div><div id="ETreeOnlyTestCase.test_prefix_default_ns-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_prefix_default_ns-expanded"><a name="L1584"></a><tt class="py-lineno">1584</tt> <tt class="py-line"> <tt id="link-1839" class="py-name"><a title="lxml.etree.ElementTree
5271 xml.etree.ElementTree
5272 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-1839', 'ElementTree', 'link-468');">ElementTree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1840" class="py-name"><a title="lxml.etree
5273 lxml.sax.ElementTreeContentHandler.etree
5274 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5275 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5276 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1840', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1841" class="py-name"><a title="lxml.etree.ElementTree
5277 xml.etree.ElementTree
5278 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-1841', 'ElementTree', 'link-468');">ElementTree</a></tt> </tt>
5279 <a name="L1585"></a><tt class="py-lineno">1585</tt> <tt class="py-line"> </tt>
5280 <a name="L1586"></a><tt class="py-lineno">1586</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-string">'<a xmlns="http://www.infrae.com/ns/1"><b/></a>'</tt><tt class="py-op">)</tt> </tt>
5281 <a name="L1587"></a><tt class="py-lineno">1587</tt> <tt class="py-line"> <tt class="py-name">doc</tt> <tt class="py-op">=</tt> <tt id="link-1842" class="py-name"><a title="lxml.etree.ElementTree
5282 xml.etree.ElementTree
5283 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-1842', 'ElementTree', 'link-468');">ElementTree</a></tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">=</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
5284 <a name="L1588"></a><tt class="py-lineno">1588</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt class="py-name">doc</tt><tt class="py-op">.</tt><tt id="link-1843" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-1843', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
5285 <a name="L1589"></a><tt class="py-lineno">1589</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5286 <a name="L1590"></a><tt class="py-lineno">1590</tt> <tt class="py-line"> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
5287 <a name="L1591"></a><tt class="py-lineno">1591</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-1844" class="py-name"><a title="lxml.etree._Element.prefix
5288 lxml.etree._ReadOnlyElementProxy.prefix
5289 lxml.etree._XPathFunctionNamespaceRegistry.prefix" class="py-name" href="#" onclick="return doclink('link-1844', 'prefix', 'link-1837');">prefix</a></tt><tt class="py-op">)</tt> </tt>
5290 <a name="L1592"></a><tt class="py-lineno">1592</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5291 <a name="L1593"></a><tt class="py-lineno">1593</tt> <tt class="py-line"> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
5292 <a name="L1594"></a><tt class="py-lineno">1594</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-1845" class="py-name"><a title="lxml.etree._Element.prefix
5293 lxml.etree._ReadOnlyElementProxy.prefix
5294 lxml.etree._XPathFunctionNamespaceRegistry.prefix" class="py-name" href="#" onclick="return doclink('link-1845', 'prefix', 'link-1837');">prefix</a></tt><tt class="py-op">)</tt> </tt>
5295 </div><a name="L1595"></a><tt class="py-lineno">1595</tt> <tt class="py-line"> </tt>
5296 <a name="ETreeOnlyTestCase.test_getparent"></a><div id="ETreeOnlyTestCase.test_getparent-def"><a name="L1596"></a><tt class="py-lineno">1596</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_getparent-toggle" onclick="return toggle('ETreeOnlyTestCase.test_getparent');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_getparent">test_getparent</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5297 </div><div id="ETreeOnlyTestCase.test_getparent-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_getparent-expanded"><a name="L1597"></a><tt class="py-lineno">1597</tt> <tt class="py-line"> <tt id="link-1846" class="py-name"><a title="lxml.cssselect.Element
5300 lxml.objectify.Element
5301 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5302 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1846', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1847" class="py-name"><a title="lxml.etree
5303 lxml.sax.ElementTreeContentHandler.etree
5304 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5305 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5306 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1847', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1848" class="py-name"><a title="lxml.cssselect.Element
5309 lxml.objectify.Element
5310 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5311 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1848', 'Element', 'link-69');">Element</a></tt> </tt>
5312 <a name="L1598"></a><tt class="py-lineno">1598</tt> <tt class="py-line"> <tt id="link-1849" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1849', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1850" class="py-name"><a title="lxml.etree
5313 lxml.sax.ElementTreeContentHandler.etree
5314 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5315 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5316 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1850', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1851" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1851', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
5317 <a name="L1599"></a><tt class="py-lineno">1599</tt> <tt class="py-line"> </tt>
5318 <a name="L1600"></a><tt class="py-lineno">1600</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-1852" class="py-name"><a title="lxml.cssselect.Element
5321 lxml.objectify.Element
5322 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5323 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1852', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
5324 <a name="L1601"></a><tt class="py-lineno">1601</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-1853" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1853', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
5325 <a name="L1602"></a><tt class="py-lineno">1602</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-1854" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1854', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
5326 <a name="L1603"></a><tt class="py-lineno">1603</tt> <tt class="py-line"> <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt id="link-1855" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1855', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">,</tt> <tt class="py-string">'d'</tt><tt class="py-op">)</tt> </tt>
5327 <a name="L1604"></a><tt class="py-lineno">1604</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5328 <a name="L1605"></a><tt class="py-lineno">1605</tt> <tt class="py-line"> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
5329 <a name="L1606"></a><tt class="py-lineno">1606</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-1856" class="py-name" targets="Method lxml.etree._Element.getparent()=lxml.etree._Element-class.html#getparent,Method lxml.etree._ElementStringResult.getparent()=lxml.etree._ElementStringResult-class.html#getparent,Method lxml.etree._ElementUnicodeResult.getparent()=lxml.etree._ElementUnicodeResult-class.html#getparent,Method lxml.etree._ReadOnlyProxy.getparent()=lxml.etree._ReadOnlyProxy-class.html#getparent"><a title="lxml.etree._Element.getparent
5330 lxml.etree._ElementStringResult.getparent
5331 lxml.etree._ElementUnicodeResult.getparent
5332 lxml.etree._ReadOnlyProxy.getparent" class="py-name" href="#" onclick="return doclink('link-1856', 'getparent', 'link-1856');">getparent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5333 <a name="L1607"></a><tt class="py-lineno">1607</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5334 <a name="L1608"></a><tt class="py-lineno">1608</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">,</tt> </tt>
5335 <a name="L1609"></a><tt class="py-lineno">1609</tt> <tt class="py-line"> <tt class="py-name">b</tt><tt class="py-op">.</tt><tt id="link-1857" class="py-name"><a title="lxml.etree._Element.getparent
5336 lxml.etree._ElementStringResult.getparent
5337 lxml.etree._ElementUnicodeResult.getparent
5338 lxml.etree._ReadOnlyProxy.getparent" class="py-name" href="#" onclick="return doclink('link-1857', 'getparent', 'link-1856');">getparent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5339 <a name="L1610"></a><tt class="py-lineno">1610</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5340 <a name="L1611"></a><tt class="py-lineno">1611</tt> <tt class="py-line"> <tt class="py-name">b</tt><tt class="py-op">.</tt><tt id="link-1858" class="py-name"><a title="lxml.etree._Element.getparent
5341 lxml.etree._ElementStringResult.getparent
5342 lxml.etree._ElementUnicodeResult.getparent
5343 lxml.etree._ReadOnlyProxy.getparent" class="py-name" href="#" onclick="return doclink('link-1858', 'getparent', 'link-1856');">getparent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
5344 <a name="L1612"></a><tt class="py-lineno">1612</tt> <tt class="py-line"> <tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-1859" class="py-name"><a title="lxml.etree._Element.getparent
5345 lxml.etree._ElementStringResult.getparent
5346 lxml.etree._ElementUnicodeResult.getparent
5347 lxml.etree._ReadOnlyProxy.getparent" class="py-name" href="#" onclick="return doclink('link-1859', 'getparent', 'link-1856');">getparent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5348 <a name="L1613"></a><tt class="py-lineno">1613</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5349 <a name="L1614"></a><tt class="py-lineno">1614</tt> <tt class="py-line"> <tt class="py-name">b</tt><tt class="py-op">,</tt> </tt>
5350 <a name="L1615"></a><tt class="py-lineno">1615</tt> <tt class="py-line"> <tt class="py-name">d</tt><tt class="py-op">.</tt><tt id="link-1860" class="py-name"><a title="lxml.etree._Element.getparent
5351 lxml.etree._ElementStringResult.getparent
5352 lxml.etree._ElementUnicodeResult.getparent
5353 lxml.etree._ReadOnlyProxy.getparent" class="py-name" href="#" onclick="return doclink('link-1860', 'getparent', 'link-1856');">getparent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5354 </div><a name="L1616"></a><tt class="py-lineno">1616</tt> <tt class="py-line"> </tt>
5355 <a name="ETreeOnlyTestCase.test_iterchildren"></a><div id="ETreeOnlyTestCase.test_iterchildren-def"><a name="L1617"></a><tt class="py-lineno">1617</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterchildren-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterchildren');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterchildren">test_iterchildren</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5356 </div><div id="ETreeOnlyTestCase.test_iterchildren-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterchildren-expanded"><a name="L1618"></a><tt class="py-lineno">1618</tt> <tt class="py-line"> <tt id="link-1861" class="py-name"><a title="lxml.etree.XML
5358 lxml.tests.test_objectify.ObjectifyTestCase.XML
5359 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1861', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1862" class="py-name"><a title="lxml.etree
5360 lxml.sax.ElementTreeContentHandler.etree
5361 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5362 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5363 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1862', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1863" class="py-name"><a title="lxml.etree.XML
5365 lxml.tests.test_objectify.ObjectifyTestCase.XML
5366 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1863', 'XML', 'link-217');">XML</a></tt> </tt>
5367 <a name="L1619"></a><tt class="py-lineno">1619</tt> <tt class="py-line"> </tt>
5368 <a name="L1620"></a><tt class="py-lineno">1620</tt> <tt class="py-line"> <tt id="link-1864" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1864', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-1865" class="py-name"><a title="lxml.etree.XML
5370 lxml.tests.test_objectify.ObjectifyTestCase.XML
5371 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1865', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-1866" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1866', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<doc><one/><two>Two</two>Hm<three/></doc>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5372 <a name="L1621"></a><tt class="py-lineno">1621</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
5373 <a name="L1622"></a><tt class="py-lineno">1622</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">el</tt> <tt class="py-keyword">in</tt> <tt id="link-1867" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1867', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1868" class="py-name" targets="Method lxml.etree._Element.iterchildren()=lxml.etree._Element-class.html#iterchildren,Method lxml.etree._ReadOnlyProxy.iterchildren()=lxml.etree._ReadOnlyProxy-class.html#iterchildren"><a title="lxml.etree._Element.iterchildren
5374 lxml.etree._ReadOnlyProxy.iterchildren" class="py-name" href="#" onclick="return doclink('link-1868', 'iterchildren', 'link-1868');">iterchildren</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5375 <a name="L1623"></a><tt class="py-lineno">1623</tt> <tt class="py-line"> <tt class="py-name">result</tt><tt class="py-op">.</tt><tt id="link-1869" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
5376 lxml.etree._Element.append
5377 lxml.etree._OpaqueDocumentWrapper.append
5378 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1869', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-1870" class="py-name"><a title="lxml.etree._Comment.tag
5379 lxml.etree._Element.tag
5380 lxml.etree._Entity.tag
5381 lxml.etree._ProcessingInstruction.tag
5382 lxml.etree._ReadOnlyProxy.tag
5383 lxml.tests.test_xpathevaluator.tag
5384 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1870', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
5385 <a name="L1624"></a><tt class="py-lineno">1624</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'one'</tt><tt class="py-op">,</tt> <tt class="py-string">'two'</tt><tt class="py-op">,</tt> <tt class="py-string">'three'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">result</tt><tt class="py-op">)</tt> </tt>
5386 </div><a name="L1625"></a><tt class="py-lineno">1625</tt> <tt class="py-line"> </tt>
5387 <a name="ETreeOnlyTestCase.test_iterchildren_reversed"></a><div id="ETreeOnlyTestCase.test_iterchildren_reversed-def"><a name="L1626"></a><tt class="py-lineno">1626</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterchildren_reversed-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterchildren_reversed');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterchildren_reversed">test_iterchildren_reversed</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5388 </div><div id="ETreeOnlyTestCase.test_iterchildren_reversed-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterchildren_reversed-expanded"><a name="L1627"></a><tt class="py-lineno">1627</tt> <tt class="py-line"> <tt id="link-1871" class="py-name"><a title="lxml.etree.XML
5390 lxml.tests.test_objectify.ObjectifyTestCase.XML
5391 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1871', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1872" class="py-name"><a title="lxml.etree
5392 lxml.sax.ElementTreeContentHandler.etree
5393 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5394 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5395 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1872', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1873" class="py-name"><a title="lxml.etree.XML
5397 lxml.tests.test_objectify.ObjectifyTestCase.XML
5398 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1873', 'XML', 'link-217');">XML</a></tt> </tt>
5399 <a name="L1628"></a><tt class="py-lineno">1628</tt> <tt class="py-line"> </tt>
5400 <a name="L1629"></a><tt class="py-lineno">1629</tt> <tt class="py-line"> <tt id="link-1874" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1874', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-1875" class="py-name"><a title="lxml.etree.XML
5402 lxml.tests.test_objectify.ObjectifyTestCase.XML
5403 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1875', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-1876" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1876', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<doc><one/><two>Two</two>Hm<three/></doc>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5404 <a name="L1630"></a><tt class="py-lineno">1630</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
5405 <a name="L1631"></a><tt class="py-lineno">1631</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">el</tt> <tt class="py-keyword">in</tt> <tt id="link-1877" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1877', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1878" class="py-name"><a title="lxml.etree._Element.iterchildren
5406 lxml.etree._ReadOnlyProxy.iterchildren" class="py-name" href="#" onclick="return doclink('link-1878', 'iterchildren', 'link-1868');">iterchildren</a></tt><tt class="py-op">(</tt><tt id="link-1879" class="py-name" targets="Function lxml.tests.test_elementtree.reversed()=lxml.tests.test_elementtree-module.html#reversed"><a title="lxml.tests.test_elementtree.reversed" class="py-name" href="#" onclick="return doclink('link-1879', 'reversed', 'link-1879');">reversed</a></tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5407 <a name="L1632"></a><tt class="py-lineno">1632</tt> <tt class="py-line"> <tt class="py-name">result</tt><tt class="py-op">.</tt><tt id="link-1880" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
5408 lxml.etree._Element.append
5409 lxml.etree._OpaqueDocumentWrapper.append
5410 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1880', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-1881" class="py-name"><a title="lxml.etree._Comment.tag
5411 lxml.etree._Element.tag
5412 lxml.etree._Entity.tag
5413 lxml.etree._ProcessingInstruction.tag
5414 lxml.etree._ReadOnlyProxy.tag
5415 lxml.tests.test_xpathevaluator.tag
5416 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1881', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
5417 <a name="L1633"></a><tt class="py-lineno">1633</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'three'</tt><tt class="py-op">,</tt> <tt class="py-string">'two'</tt><tt class="py-op">,</tt> <tt class="py-string">'one'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">result</tt><tt class="py-op">)</tt> </tt>
5418 </div><a name="L1634"></a><tt class="py-lineno">1634</tt> <tt class="py-line"> </tt>
5419 <a name="ETreeOnlyTestCase.test_iterchildren_tag"></a><div id="ETreeOnlyTestCase.test_iterchildren_tag-def"><a name="L1635"></a><tt class="py-lineno">1635</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterchildren_tag-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterchildren_tag');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterchildren_tag">test_iterchildren_tag</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5420 </div><div id="ETreeOnlyTestCase.test_iterchildren_tag-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterchildren_tag-expanded"><a name="L1636"></a><tt class="py-lineno">1636</tt> <tt class="py-line"> <tt id="link-1882" class="py-name"><a title="lxml.etree.XML
5422 lxml.tests.test_objectify.ObjectifyTestCase.XML
5423 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1882', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1883" class="py-name"><a title="lxml.etree
5424 lxml.sax.ElementTreeContentHandler.etree
5425 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5426 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5427 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1883', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1884" class="py-name"><a title="lxml.etree.XML
5429 lxml.tests.test_objectify.ObjectifyTestCase.XML
5430 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1884', 'XML', 'link-217');">XML</a></tt> </tt>
5431 <a name="L1637"></a><tt class="py-lineno">1637</tt> <tt class="py-line"> </tt>
5432 <a name="L1638"></a><tt class="py-lineno">1638</tt> <tt class="py-line"> <tt id="link-1885" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1885', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-1886" class="py-name"><a title="lxml.etree.XML
5434 lxml.tests.test_objectify.ObjectifyTestCase.XML
5435 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1886', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-1887" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1887', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<doc><one/><two>Two</two>Hm<two>Bla</two></doc>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5436 <a name="L1639"></a><tt class="py-lineno">1639</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
5437 <a name="L1640"></a><tt class="py-lineno">1640</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">el</tt> <tt class="py-keyword">in</tt> <tt id="link-1888" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1888', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1889" class="py-name"><a title="lxml.etree._Element.iterchildren
5438 lxml.etree._ReadOnlyProxy.iterchildren" class="py-name" href="#" onclick="return doclink('link-1889', 'iterchildren', 'link-1868');">iterchildren</a></tt><tt class="py-op">(</tt><tt id="link-1890" class="py-name"><a title="lxml.etree._Comment.tag
5439 lxml.etree._Element.tag
5440 lxml.etree._Entity.tag
5441 lxml.etree._ProcessingInstruction.tag
5442 lxml.etree._ReadOnlyProxy.tag
5443 lxml.tests.test_xpathevaluator.tag
5444 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1890', 'tag', 'link-73');">tag</a></tt><tt class="py-op">=</tt><tt class="py-string">'two'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5445 <a name="L1641"></a><tt class="py-lineno">1641</tt> <tt class="py-line"> <tt class="py-name">result</tt><tt class="py-op">.</tt><tt id="link-1891" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
5446 lxml.etree._Element.append
5447 lxml.etree._OpaqueDocumentWrapper.append
5448 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1891', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-1892" class="py-name"><a title="lxml.etree.QName.text
5449 lxml.etree._AppendOnlyElementProxy.text
5450 lxml.etree._Element.text
5451 lxml.etree._Entity.text
5452 lxml.etree._ModifyContentOnlyProxy.text
5453 lxml.etree._ReadOnlyEntityProxy.text
5454 lxml.etree._ReadOnlyProxy.text
5455 lxml.etree.__ContentOnlyElement.text
5456 lxml.objectify.ObjectifiedElement.text
5457 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-1892', 'text', 'link-194');">text</a></tt><tt class="py-op">)</tt> </tt>
5458 <a name="L1642"></a><tt class="py-lineno">1642</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'Two'</tt><tt class="py-op">,</tt> <tt class="py-string">'Bla'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">result</tt><tt class="py-op">)</tt> </tt>
5459 </div><a name="L1643"></a><tt class="py-lineno">1643</tt> <tt class="py-line"> </tt>
5460 <a name="ETreeOnlyTestCase.test_iterchildren_tag_reversed"></a><div id="ETreeOnlyTestCase.test_iterchildren_tag_reversed-def"><a name="L1644"></a><tt class="py-lineno">1644</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterchildren_tag_reversed-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterchildren_tag_reversed');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterchildren_tag_reversed">test_iterchildren_tag_reversed</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5461 </div><div id="ETreeOnlyTestCase.test_iterchildren_tag_reversed-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterchildren_tag_reversed-expanded"><a name="L1645"></a><tt class="py-lineno">1645</tt> <tt class="py-line"> <tt id="link-1893" class="py-name"><a title="lxml.etree.XML
5463 lxml.tests.test_objectify.ObjectifyTestCase.XML
5464 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1893', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1894" class="py-name"><a title="lxml.etree
5465 lxml.sax.ElementTreeContentHandler.etree
5466 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5467 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5468 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1894', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1895" class="py-name"><a title="lxml.etree.XML
5470 lxml.tests.test_objectify.ObjectifyTestCase.XML
5471 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1895', 'XML', 'link-217');">XML</a></tt> </tt>
5472 <a name="L1646"></a><tt class="py-lineno">1646</tt> <tt class="py-line"> </tt>
5473 <a name="L1647"></a><tt class="py-lineno">1647</tt> <tt class="py-line"> <tt id="link-1896" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1896', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-1897" class="py-name"><a title="lxml.etree.XML
5475 lxml.tests.test_objectify.ObjectifyTestCase.XML
5476 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1897', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-1898" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-1898', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<doc><one/><two>Two</two>Hm<two>Bla</two></doc>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5477 <a name="L1648"></a><tt class="py-lineno">1648</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
5478 <a name="L1649"></a><tt class="py-lineno">1649</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">el</tt> <tt class="py-keyword">in</tt> <tt id="link-1899" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-1899', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-1900" class="py-name"><a title="lxml.etree._Element.iterchildren
5479 lxml.etree._ReadOnlyProxy.iterchildren" class="py-name" href="#" onclick="return doclink('link-1900', 'iterchildren', 'link-1868');">iterchildren</a></tt><tt class="py-op">(</tt><tt id="link-1901" class="py-name"><a title="lxml.tests.test_elementtree.reversed" class="py-name" href="#" onclick="return doclink('link-1901', 'reversed', 'link-1879');">reversed</a></tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> <tt id="link-1902" class="py-name"><a title="lxml.etree._Comment.tag
5480 lxml.etree._Element.tag
5481 lxml.etree._Entity.tag
5482 lxml.etree._ProcessingInstruction.tag
5483 lxml.etree._ReadOnlyProxy.tag
5484 lxml.tests.test_xpathevaluator.tag
5485 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1902', 'tag', 'link-73');">tag</a></tt><tt class="py-op">=</tt><tt class="py-string">'two'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5486 <a name="L1650"></a><tt class="py-lineno">1650</tt> <tt class="py-line"> <tt class="py-name">result</tt><tt class="py-op">.</tt><tt id="link-1903" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
5487 lxml.etree._Element.append
5488 lxml.etree._OpaqueDocumentWrapper.append
5489 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-1903', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-1904" class="py-name"><a title="lxml.etree.QName.text
5490 lxml.etree._AppendOnlyElementProxy.text
5491 lxml.etree._Element.text
5492 lxml.etree._Entity.text
5493 lxml.etree._ModifyContentOnlyProxy.text
5494 lxml.etree._ReadOnlyEntityProxy.text
5495 lxml.etree._ReadOnlyProxy.text
5496 lxml.etree.__ContentOnlyElement.text
5497 lxml.objectify.ObjectifiedElement.text
5498 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-1904', 'text', 'link-194');">text</a></tt><tt class="py-op">)</tt> </tt>
5499 <a name="L1651"></a><tt class="py-lineno">1651</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'Bla'</tt><tt class="py-op">,</tt> <tt class="py-string">'Two'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">result</tt><tt class="py-op">)</tt> </tt>
5500 </div><a name="L1652"></a><tt class="py-lineno">1652</tt> <tt class="py-line"> </tt>
5501 <a name="ETreeOnlyTestCase.test_iterancestors"></a><div id="ETreeOnlyTestCase.test_iterancestors-def"><a name="L1653"></a><tt class="py-lineno">1653</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterancestors-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterancestors');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterancestors">test_iterancestors</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5502 </div><div id="ETreeOnlyTestCase.test_iterancestors-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterancestors-expanded"><a name="L1654"></a><tt class="py-lineno">1654</tt> <tt class="py-line"> <tt id="link-1905" class="py-name"><a title="lxml.cssselect.Element
5505 lxml.objectify.Element
5506 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5507 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1905', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1906" class="py-name"><a title="lxml.etree
5508 lxml.sax.ElementTreeContentHandler.etree
5509 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5510 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5511 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1906', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1907" class="py-name"><a title="lxml.cssselect.Element
5514 lxml.objectify.Element
5515 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5516 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1907', 'Element', 'link-69');">Element</a></tt> </tt>
5517 <a name="L1655"></a><tt class="py-lineno">1655</tt> <tt class="py-line"> <tt id="link-1908" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1908', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1909" class="py-name"><a title="lxml.etree
5518 lxml.sax.ElementTreeContentHandler.etree
5519 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5520 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5521 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1909', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1910" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1910', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
5522 <a name="L1656"></a><tt class="py-lineno">1656</tt> <tt class="py-line"> </tt>
5523 <a name="L1657"></a><tt class="py-lineno">1657</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-1911" class="py-name"><a title="lxml.cssselect.Element
5526 lxml.objectify.Element
5527 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5528 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1911', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
5529 <a name="L1658"></a><tt class="py-lineno">1658</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-1912" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1912', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
5530 <a name="L1659"></a><tt class="py-lineno">1659</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-1913" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1913', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
5531 <a name="L1660"></a><tt class="py-lineno">1660</tt> <tt class="py-line"> <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt id="link-1914" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1914', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">,</tt> <tt class="py-string">'d'</tt><tt class="py-op">)</tt> </tt>
5532 <a name="L1661"></a><tt class="py-lineno">1661</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5533 <a name="L1662"></a><tt class="py-lineno">1662</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
5534 <a name="L1663"></a><tt class="py-lineno">1663</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-1915" class="py-name" targets="Method lxml.etree._Element.iterancestors()=lxml.etree._Element-class.html#iterancestors"><a title="lxml.etree._Element.iterancestors" class="py-name" href="#" onclick="return doclink('link-1915', 'iterancestors', 'link-1915');">iterancestors</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5535 <a name="L1664"></a><tt class="py-lineno">1664</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5536 <a name="L1665"></a><tt class="py-lineno">1665</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">a</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
5537 <a name="L1666"></a><tt class="py-lineno">1666</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">.</tt><tt id="link-1916" class="py-name"><a title="lxml.etree._Element.iterancestors" class="py-name" href="#" onclick="return doclink('link-1916', 'iterancestors', 'link-1915');">iterancestors</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5538 <a name="L1667"></a><tt class="py-lineno">1667</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5539 <a name="L1668"></a><tt class="py-lineno">1668</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">a</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
5540 <a name="L1669"></a><tt class="py-lineno">1669</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-1917" class="py-name"><a title="lxml.etree._Element.iterancestors" class="py-name" href="#" onclick="return doclink('link-1917', 'iterancestors', 'link-1915');">iterancestors</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5541 <a name="L1670"></a><tt class="py-lineno">1670</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5542 <a name="L1671"></a><tt class="py-lineno">1671</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">b</tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
5543 <a name="L1672"></a><tt class="py-lineno">1672</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">d</tt><tt class="py-op">.</tt><tt id="link-1918" class="py-name"><a title="lxml.etree._Element.iterancestors" class="py-name" href="#" onclick="return doclink('link-1918', 'iterancestors', 'link-1915');">iterancestors</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5544 </div><a name="L1673"></a><tt class="py-lineno">1673</tt> <tt class="py-line"> </tt>
5545 <a name="ETreeOnlyTestCase.test_iterancestors_tag"></a><div id="ETreeOnlyTestCase.test_iterancestors_tag-def"><a name="L1674"></a><tt class="py-lineno">1674</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterancestors_tag-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterancestors_tag');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterancestors_tag">test_iterancestors_tag</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5546 </div><div id="ETreeOnlyTestCase.test_iterancestors_tag-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterancestors_tag-expanded"><a name="L1675"></a><tt class="py-lineno">1675</tt> <tt class="py-line"> <tt id="link-1919" class="py-name"><a title="lxml.cssselect.Element
5549 lxml.objectify.Element
5550 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5551 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1919', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1920" class="py-name"><a title="lxml.etree
5552 lxml.sax.ElementTreeContentHandler.etree
5553 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5554 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5555 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1920', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1921" class="py-name"><a title="lxml.cssselect.Element
5558 lxml.objectify.Element
5559 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5560 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1921', 'Element', 'link-69');">Element</a></tt> </tt>
5561 <a name="L1676"></a><tt class="py-lineno">1676</tt> <tt class="py-line"> <tt id="link-1922" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1922', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1923" class="py-name"><a title="lxml.etree
5562 lxml.sax.ElementTreeContentHandler.etree
5563 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5564 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5565 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1923', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1924" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1924', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
5566 <a name="L1677"></a><tt class="py-lineno">1677</tt> <tt class="py-line"> </tt>
5567 <a name="L1678"></a><tt class="py-lineno">1678</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-1925" class="py-name"><a title="lxml.cssselect.Element
5570 lxml.objectify.Element
5571 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5572 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1925', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
5573 <a name="L1679"></a><tt class="py-lineno">1679</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-1926" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1926', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
5574 <a name="L1680"></a><tt class="py-lineno">1680</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-1927" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1927', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
5575 <a name="L1681"></a><tt class="py-lineno">1681</tt> <tt class="py-line"> <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt id="link-1928" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1928', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">,</tt> <tt class="py-string">'d'</tt><tt class="py-op">)</tt> </tt>
5576 <a name="L1682"></a><tt class="py-lineno">1682</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5577 <a name="L1683"></a><tt class="py-lineno">1683</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">a</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
5578 <a name="L1684"></a><tt class="py-lineno">1684</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">d</tt><tt class="py-op">.</tt><tt id="link-1929" class="py-name"><a title="lxml.etree._Element.iterancestors" class="py-name" href="#" onclick="return doclink('link-1929', 'iterancestors', 'link-1915');">iterancestors</a></tt><tt class="py-op">(</tt><tt id="link-1930" class="py-name"><a title="lxml.etree._Comment.tag
5579 lxml.etree._Element.tag
5580 lxml.etree._Entity.tag
5581 lxml.etree._ProcessingInstruction.tag
5582 lxml.etree._ReadOnlyProxy.tag
5583 lxml.tests.test_xpathevaluator.tag
5584 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-1930', 'tag', 'link-73');">tag</a></tt><tt class="py-op">=</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5585 </div><a name="L1685"></a><tt class="py-lineno">1685</tt> <tt class="py-line"> </tt>
5586 <a name="ETreeOnlyTestCase.test_iterdescendants"></a><div id="ETreeOnlyTestCase.test_iterdescendants-def"><a name="L1686"></a><tt class="py-lineno">1686</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterdescendants-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterdescendants');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterdescendants">test_iterdescendants</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5587 </div><div id="ETreeOnlyTestCase.test_iterdescendants-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterdescendants-expanded"><a name="L1687"></a><tt class="py-lineno">1687</tt> <tt class="py-line"> <tt id="link-1931" class="py-name"><a title="lxml.cssselect.Element
5590 lxml.objectify.Element
5591 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5592 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1931', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1932" class="py-name"><a title="lxml.etree
5593 lxml.sax.ElementTreeContentHandler.etree
5594 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5595 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5596 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1932', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1933" class="py-name"><a title="lxml.cssselect.Element
5599 lxml.objectify.Element
5600 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5601 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1933', 'Element', 'link-69');">Element</a></tt> </tt>
5602 <a name="L1688"></a><tt class="py-lineno">1688</tt> <tt class="py-line"> <tt id="link-1934" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1934', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1935" class="py-name"><a title="lxml.etree
5603 lxml.sax.ElementTreeContentHandler.etree
5604 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5605 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5606 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1935', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1936" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1936', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
5607 <a name="L1689"></a><tt class="py-lineno">1689</tt> <tt class="py-line"> </tt>
5608 <a name="L1690"></a><tt class="py-lineno">1690</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-1937" class="py-name"><a title="lxml.cssselect.Element
5611 lxml.objectify.Element
5612 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5613 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1937', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
5614 <a name="L1691"></a><tt class="py-lineno">1691</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-1938" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1938', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
5615 <a name="L1692"></a><tt class="py-lineno">1692</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-1939" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1939', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
5616 <a name="L1693"></a><tt class="py-lineno">1693</tt> <tt class="py-line"> <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt id="link-1940" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1940', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">,</tt> <tt class="py-string">'d'</tt><tt class="py-op">)</tt> </tt>
5617 <a name="L1694"></a><tt class="py-lineno">1694</tt> <tt class="py-line"> <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt id="link-1941" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1941', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-string">'e'</tt><tt class="py-op">)</tt> </tt>
5618 <a name="L1695"></a><tt class="py-lineno">1695</tt> <tt class="py-line"> </tt>
5619 <a name="L1696"></a><tt class="py-lineno">1696</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5620 <a name="L1697"></a><tt class="py-lineno">1697</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">b</tt><tt class="py-op">,</tt> <tt class="py-name">d</tt><tt class="py-op">,</tt> <tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
5621 <a name="L1698"></a><tt class="py-lineno">1698</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-1942" class="py-name" targets="Method lxml.etree._Element.iterdescendants()=lxml.etree._Element-class.html#iterdescendants"><a title="lxml.etree._Element.iterdescendants" class="py-name" href="#" onclick="return doclink('link-1942', 'iterdescendants', 'link-1942');">iterdescendants</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5622 <a name="L1699"></a><tt class="py-lineno">1699</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5623 <a name="L1700"></a><tt class="py-lineno">1700</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
5624 <a name="L1701"></a><tt class="py-lineno">1701</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">d</tt><tt class="py-op">.</tt><tt id="link-1943" class="py-name"><a title="lxml.etree._Element.iterdescendants" class="py-name" href="#" onclick="return doclink('link-1943', 'iterdescendants', 'link-1942');">iterdescendants</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5625 </div><a name="L1702"></a><tt class="py-lineno">1702</tt> <tt class="py-line"> </tt>
5626 <a name="ETreeOnlyTestCase.test_iterdescendants_tag"></a><div id="ETreeOnlyTestCase.test_iterdescendants_tag-def"><a name="L1703"></a><tt class="py-lineno">1703</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_iterdescendants_tag-toggle" onclick="return toggle('ETreeOnlyTestCase.test_iterdescendants_tag');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterdescendants_tag">test_iterdescendants_tag</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5627 </div><div id="ETreeOnlyTestCase.test_iterdescendants_tag-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_iterdescendants_tag-expanded"><a name="L1704"></a><tt class="py-lineno">1704</tt> <tt class="py-line"> <tt id="link-1944" class="py-name"><a title="lxml.cssselect.Element
5630 lxml.objectify.Element
5631 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5632 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1944', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1945" class="py-name"><a title="lxml.etree
5633 lxml.sax.ElementTreeContentHandler.etree
5634 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5635 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5636 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1945', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1946" class="py-name"><a title="lxml.cssselect.Element
5639 lxml.objectify.Element
5640 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5641 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1946', 'Element', 'link-69');">Element</a></tt> </tt>
5642 <a name="L1705"></a><tt class="py-lineno">1705</tt> <tt class="py-line"> <tt id="link-1947" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1947', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1948" class="py-name"><a title="lxml.etree
5643 lxml.sax.ElementTreeContentHandler.etree
5644 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5645 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5646 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1948', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1949" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1949', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
5647 <a name="L1706"></a><tt class="py-lineno">1706</tt> <tt class="py-line"> </tt>
5648 <a name="L1707"></a><tt class="py-lineno">1707</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-1950" class="py-name"><a title="lxml.cssselect.Element
5651 lxml.objectify.Element
5652 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5653 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1950', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
5654 <a name="L1708"></a><tt class="py-lineno">1708</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-1951" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1951', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
5655 <a name="L1709"></a><tt class="py-lineno">1709</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-1952" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1952', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
5656 <a name="L1710"></a><tt class="py-lineno">1710</tt> <tt class="py-line"> <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt id="link-1953" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1953', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">,</tt> <tt class="py-string">'d'</tt><tt class="py-op">)</tt> </tt>
5657 <a name="L1711"></a><tt class="py-lineno">1711</tt> <tt class="py-line"> <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt id="link-1954" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1954', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-string">'e'</tt><tt class="py-op">)</tt> </tt>
5658 <a name="L1712"></a><tt class="py-lineno">1712</tt> <tt class="py-line"> </tt>
5659 <a name="L1713"></a><tt class="py-lineno">1713</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5660 <a name="L1714"></a><tt class="py-lineno">1714</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
5661 <a name="L1715"></a><tt class="py-lineno">1715</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-1955" class="py-name"><a title="lxml.etree._Element.iterdescendants" class="py-name" href="#" onclick="return doclink('link-1955', 'iterdescendants', 'link-1942');">iterdescendants</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5662 <a name="L1716"></a><tt class="py-lineno">1716</tt> <tt class="py-line"> <tt class="py-name">a2</tt> <tt class="py-op">=</tt> <tt id="link-1956" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1956', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">,</tt> <tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
5663 <a name="L1717"></a><tt class="py-lineno">1717</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5664 <a name="L1718"></a><tt class="py-lineno">1718</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">a2</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
5665 <a name="L1719"></a><tt class="py-lineno">1719</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-1957" class="py-name"><a title="lxml.etree._Element.iterdescendants" class="py-name" href="#" onclick="return doclink('link-1957', 'iterdescendants', 'link-1942');">iterdescendants</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5666 <a name="L1720"></a><tt class="py-lineno">1720</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5667 <a name="L1721"></a><tt class="py-lineno">1721</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">a2</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
5668 <a name="L1722"></a><tt class="py-lineno">1722</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-1958" class="py-name"><a title="lxml.etree._Element.iterdescendants" class="py-name" href="#" onclick="return doclink('link-1958', 'iterdescendants', 'link-1942');">iterdescendants</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5669 </div><a name="L1723"></a><tt class="py-lineno">1723</tt> <tt class="py-line"> </tt>
5670 <a name="ETreeOnlyTestCase.test_getroottree"></a><div id="ETreeOnlyTestCase.test_getroottree-def"><a name="L1724"></a><tt class="py-lineno">1724</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_getroottree-toggle" onclick="return toggle('ETreeOnlyTestCase.test_getroottree');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_getroottree">test_getroottree</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5671 </div><div id="ETreeOnlyTestCase.test_getroottree-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_getroottree-expanded"><a name="L1725"></a><tt class="py-lineno">1725</tt> <tt class="py-line"> <tt id="link-1959" class="py-name"><a title="lxml.cssselect.Element
5674 lxml.objectify.Element
5675 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5676 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1959', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1960" class="py-name"><a title="lxml.etree
5677 lxml.sax.ElementTreeContentHandler.etree
5678 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5679 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5680 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1960', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1961" class="py-name"><a title="lxml.cssselect.Element
5683 lxml.objectify.Element
5684 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5685 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1961', 'Element', 'link-69');">Element</a></tt> </tt>
5686 <a name="L1726"></a><tt class="py-lineno">1726</tt> <tt class="py-line"> <tt id="link-1962" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1962', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1963" class="py-name"><a title="lxml.etree
5687 lxml.sax.ElementTreeContentHandler.etree
5688 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5689 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5690 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1963', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1964" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1964', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
5691 <a name="L1727"></a><tt class="py-lineno">1727</tt> <tt class="py-line"> </tt>
5692 <a name="L1728"></a><tt class="py-lineno">1728</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-1965" class="py-name"><a title="lxml.cssselect.Element
5695 lxml.objectify.Element
5696 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5697 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1965', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
5698 <a name="L1729"></a><tt class="py-lineno">1729</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-1966" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1966', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
5699 <a name="L1730"></a><tt class="py-lineno">1730</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-1967" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1967', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
5700 <a name="L1731"></a><tt class="py-lineno">1731</tt> <tt class="py-line"> <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt id="link-1968" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1968', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">,</tt> <tt class="py-string">'d'</tt><tt class="py-op">)</tt> </tt>
5701 <a name="L1732"></a><tt class="py-lineno">1732</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5702 <a name="L1733"></a><tt class="py-lineno">1733</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">,</tt> </tt>
5703 <a name="L1734"></a><tt class="py-lineno">1734</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-1969" class="py-name" targets="Method lxml.etree._Element.getroottree()=lxml.etree._Element-class.html#getroottree"><a title="lxml.etree._Element.getroottree" class="py-name" href="#" onclick="return doclink('link-1969', 'getroottree', 'link-1969');">getroottree</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1970" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-1970', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5704 <a name="L1735"></a><tt class="py-lineno">1735</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5705 <a name="L1736"></a><tt class="py-lineno">1736</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">,</tt> </tt>
5706 <a name="L1737"></a><tt class="py-lineno">1737</tt> <tt class="py-line"> <tt class="py-name">b</tt><tt class="py-op">.</tt><tt id="link-1971" class="py-name"><a title="lxml.etree._Element.getroottree" class="py-name" href="#" onclick="return doclink('link-1971', 'getroottree', 'link-1969');">getroottree</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1972" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-1972', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5707 <a name="L1738"></a><tt class="py-lineno">1738</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5708 <a name="L1739"></a><tt class="py-lineno">1739</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">,</tt> </tt>
5709 <a name="L1740"></a><tt class="py-lineno">1740</tt> <tt class="py-line"> <tt class="py-name">d</tt><tt class="py-op">.</tt><tt id="link-1973" class="py-name"><a title="lxml.etree._Element.getroottree" class="py-name" href="#" onclick="return doclink('link-1973', 'getroottree', 'link-1969');">getroottree</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1974" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-1974', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5710 </div><a name="L1741"></a><tt class="py-lineno">1741</tt> <tt class="py-line"> </tt>
5711 <a name="ETreeOnlyTestCase.test_getnext"></a><div id="ETreeOnlyTestCase.test_getnext-def"><a name="L1742"></a><tt class="py-lineno">1742</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_getnext-toggle" onclick="return toggle('ETreeOnlyTestCase.test_getnext');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_getnext">test_getnext</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5712 </div><div id="ETreeOnlyTestCase.test_getnext-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_getnext-expanded"><a name="L1743"></a><tt class="py-lineno">1743</tt> <tt class="py-line"> <tt id="link-1975" class="py-name"><a title="lxml.cssselect.Element
5715 lxml.objectify.Element
5716 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5717 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1975', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1976" class="py-name"><a title="lxml.etree
5718 lxml.sax.ElementTreeContentHandler.etree
5719 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5720 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5721 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1976', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1977" class="py-name"><a title="lxml.cssselect.Element
5724 lxml.objectify.Element
5725 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5726 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1977', 'Element', 'link-69');">Element</a></tt> </tt>
5727 <a name="L1744"></a><tt class="py-lineno">1744</tt> <tt class="py-line"> <tt id="link-1978" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1978', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1979" class="py-name"><a title="lxml.etree
5728 lxml.sax.ElementTreeContentHandler.etree
5729 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5730 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5731 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1979', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1980" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1980', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
5732 <a name="L1745"></a><tt class="py-lineno">1745</tt> <tt class="py-line"> </tt>
5733 <a name="L1746"></a><tt class="py-lineno">1746</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-1981" class="py-name"><a title="lxml.cssselect.Element
5736 lxml.objectify.Element
5737 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5738 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1981', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
5739 <a name="L1747"></a><tt class="py-lineno">1747</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-1982" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1982', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
5740 <a name="L1748"></a><tt class="py-lineno">1748</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-1983" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1983', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
5741 <a name="L1749"></a><tt class="py-lineno">1749</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5742 <a name="L1750"></a><tt class="py-lineno">1750</tt> <tt class="py-line"> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
5743 <a name="L1751"></a><tt class="py-lineno">1751</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-1984" class="py-name" targets="Method lxml.etree._Element.getnext()=lxml.etree._Element-class.html#getnext,Method lxml.etree._ReadOnlyProxy.getnext()=lxml.etree._ReadOnlyProxy-class.html#getnext"><a title="lxml.etree._Element.getnext
5744 lxml.etree._ReadOnlyProxy.getnext" class="py-name" href="#" onclick="return doclink('link-1984', 'getnext', 'link-1984');">getnext</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5745 <a name="L1752"></a><tt class="py-lineno">1752</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5746 <a name="L1753"></a><tt class="py-lineno">1753</tt> <tt class="py-line"> <tt class="py-name">c</tt><tt class="py-op">,</tt> </tt>
5747 <a name="L1754"></a><tt class="py-lineno">1754</tt> <tt class="py-line"> <tt class="py-name">b</tt><tt class="py-op">.</tt><tt id="link-1985" class="py-name"><a title="lxml.etree._Element.getnext
5748 lxml.etree._ReadOnlyProxy.getnext" class="py-name" href="#" onclick="return doclink('link-1985', 'getnext', 'link-1984');">getnext</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5749 <a name="L1755"></a><tt class="py-lineno">1755</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5750 <a name="L1756"></a><tt class="py-lineno">1756</tt> <tt class="py-line"> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
5751 <a name="L1757"></a><tt class="py-lineno">1757</tt> <tt class="py-line"> <tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-1986" class="py-name"><a title="lxml.etree._Element.getnext
5752 lxml.etree._ReadOnlyProxy.getnext" class="py-name" href="#" onclick="return doclink('link-1986', 'getnext', 'link-1984');">getnext</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5753 </div><a name="L1758"></a><tt class="py-lineno">1758</tt> <tt class="py-line"> </tt>
5754 <a name="ETreeOnlyTestCase.test_getprevious"></a><div id="ETreeOnlyTestCase.test_getprevious-def"><a name="L1759"></a><tt class="py-lineno">1759</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_getprevious-toggle" onclick="return toggle('ETreeOnlyTestCase.test_getprevious');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_getprevious">test_getprevious</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5755 </div><div id="ETreeOnlyTestCase.test_getprevious-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_getprevious-expanded"><a name="L1760"></a><tt class="py-lineno">1760</tt> <tt class="py-line"> <tt id="link-1987" class="py-name"><a title="lxml.cssselect.Element
5758 lxml.objectify.Element
5759 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5760 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1987', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1988" class="py-name"><a title="lxml.etree
5761 lxml.sax.ElementTreeContentHandler.etree
5762 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5763 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5764 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1988', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1989" class="py-name"><a title="lxml.cssselect.Element
5767 lxml.objectify.Element
5768 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5769 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1989', 'Element', 'link-69');">Element</a></tt> </tt>
5770 <a name="L1761"></a><tt class="py-lineno">1761</tt> <tt class="py-line"> <tt id="link-1990" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1990', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1991" class="py-name"><a title="lxml.etree
5771 lxml.sax.ElementTreeContentHandler.etree
5772 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5773 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5774 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-1991', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-1992" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1992', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
5775 <a name="L1762"></a><tt class="py-lineno">1762</tt> <tt class="py-line"> </tt>
5776 <a name="L1763"></a><tt class="py-lineno">1763</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-1993" class="py-name"><a title="lxml.cssselect.Element
5779 lxml.objectify.Element
5780 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5781 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1993', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
5782 <a name="L1764"></a><tt class="py-lineno">1764</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-1994" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1994', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
5783 <a name="L1765"></a><tt class="py-lineno">1765</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-1995" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1995', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
5784 <a name="L1766"></a><tt class="py-lineno">1766</tt> <tt class="py-line"> <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt id="link-1996" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-1996', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">,</tt> <tt class="py-string">'d'</tt><tt class="py-op">)</tt> </tt>
5785 <a name="L1767"></a><tt class="py-lineno">1767</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5786 <a name="L1768"></a><tt class="py-lineno">1768</tt> <tt class="py-line"> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
5787 <a name="L1769"></a><tt class="py-lineno">1769</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-1997" class="py-name" targets="Method lxml.etree._Element.getprevious()=lxml.etree._Element-class.html#getprevious,Method lxml.etree._ReadOnlyProxy.getprevious()=lxml.etree._ReadOnlyProxy-class.html#getprevious"><a title="lxml.etree._Element.getprevious
5788 lxml.etree._ReadOnlyProxy.getprevious" class="py-name" href="#" onclick="return doclink('link-1997', 'getprevious', 'link-1997');">getprevious</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5789 <a name="L1770"></a><tt class="py-lineno">1770</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5790 <a name="L1771"></a><tt class="py-lineno">1771</tt> <tt class="py-line"> <tt class="py-name">b</tt><tt class="py-op">,</tt> </tt>
5791 <a name="L1772"></a><tt class="py-lineno">1772</tt> <tt class="py-line"> <tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-1998" class="py-name"><a title="lxml.etree._Element.getprevious
5792 lxml.etree._ReadOnlyProxy.getprevious" class="py-name" href="#" onclick="return doclink('link-1998', 'getprevious', 'link-1997');">getprevious</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5793 <a name="L1773"></a><tt class="py-lineno">1773</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5794 <a name="L1774"></a><tt class="py-lineno">1774</tt> <tt class="py-line"> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
5795 <a name="L1775"></a><tt class="py-lineno">1775</tt> <tt class="py-line"> <tt class="py-name">b</tt><tt class="py-op">.</tt><tt id="link-1999" class="py-name"><a title="lxml.etree._Element.getprevious
5796 lxml.etree._ReadOnlyProxy.getprevious" class="py-name" href="#" onclick="return doclink('link-1999', 'getprevious', 'link-1997');">getprevious</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5797 </div><a name="L1776"></a><tt class="py-lineno">1776</tt> <tt class="py-line"> </tt>
5798 <a name="ETreeOnlyTestCase.test_itersiblings"></a><div id="ETreeOnlyTestCase.test_itersiblings-def"><a name="L1777"></a><tt class="py-lineno">1777</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_itersiblings-toggle" onclick="return toggle('ETreeOnlyTestCase.test_itersiblings');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_itersiblings">test_itersiblings</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5799 </div><div id="ETreeOnlyTestCase.test_itersiblings-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_itersiblings-expanded"><a name="L1778"></a><tt class="py-lineno">1778</tt> <tt class="py-line"> <tt id="link-2000" class="py-name"><a title="lxml.cssselect.Element
5802 lxml.objectify.Element
5803 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5804 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2000', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2001" class="py-name"><a title="lxml.etree
5805 lxml.sax.ElementTreeContentHandler.etree
5806 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5807 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5808 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2001', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2002" class="py-name"><a title="lxml.cssselect.Element
5811 lxml.objectify.Element
5812 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5813 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2002', 'Element', 'link-69');">Element</a></tt> </tt>
5814 <a name="L1779"></a><tt class="py-lineno">1779</tt> <tt class="py-line"> <tt id="link-2003" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2003', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2004" class="py-name"><a title="lxml.etree
5815 lxml.sax.ElementTreeContentHandler.etree
5816 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5817 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5818 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2004', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2005" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2005', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
5819 <a name="L1780"></a><tt class="py-lineno">1780</tt> <tt class="py-line"> </tt>
5820 <a name="L1781"></a><tt class="py-lineno">1781</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-2006" class="py-name"><a title="lxml.cssselect.Element
5823 lxml.objectify.Element
5824 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5825 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2006', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
5826 <a name="L1782"></a><tt class="py-lineno">1782</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-2007" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2007', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
5827 <a name="L1783"></a><tt class="py-lineno">1783</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-2008" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2008', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
5828 <a name="L1784"></a><tt class="py-lineno">1784</tt> <tt class="py-line"> <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt id="link-2009" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2009', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">,</tt> <tt class="py-string">'d'</tt><tt class="py-op">)</tt> </tt>
5829 <a name="L1785"></a><tt class="py-lineno">1785</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5830 <a name="L1786"></a><tt class="py-lineno">1786</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
5831 <a name="L1787"></a><tt class="py-lineno">1787</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-2010" class="py-name" targets="Method lxml.etree._Element.itersiblings()=lxml.etree._Element-class.html#itersiblings"><a title="lxml.etree._Element.itersiblings" class="py-name" href="#" onclick="return doclink('link-2010', 'itersiblings', 'link-2010');">itersiblings</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5832 <a name="L1788"></a><tt class="py-lineno">1788</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5833 <a name="L1789"></a><tt class="py-lineno">1789</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">c</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
5834 <a name="L1790"></a><tt class="py-lineno">1790</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">.</tt><tt id="link-2011" class="py-name"><a title="lxml.etree._Element.itersiblings" class="py-name" href="#" onclick="return doclink('link-2011', 'itersiblings', 'link-2010');">itersiblings</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5835 <a name="L1791"></a><tt class="py-lineno">1791</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5836 <a name="L1792"></a><tt class="py-lineno">1792</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
5837 <a name="L1793"></a><tt class="py-lineno">1793</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-2012" class="py-name"><a title="lxml.etree._Element.itersiblings" class="py-name" href="#" onclick="return doclink('link-2012', 'itersiblings', 'link-2010');">itersiblings</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5838 <a name="L1794"></a><tt class="py-lineno">1794</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5839 <a name="L1795"></a><tt class="py-lineno">1795</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">b</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
5840 <a name="L1796"></a><tt class="py-lineno">1796</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-2013" class="py-name"><a title="lxml.etree._Element.itersiblings" class="py-name" href="#" onclick="return doclink('link-2013', 'itersiblings', 'link-2010');">itersiblings</a></tt><tt class="py-op">(</tt><tt class="py-name">preceding</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5841 <a name="L1797"></a><tt class="py-lineno">1797</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5842 <a name="L1798"></a><tt class="py-lineno">1798</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
5843 <a name="L1799"></a><tt class="py-lineno">1799</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">.</tt><tt id="link-2014" class="py-name"><a title="lxml.etree._Element.itersiblings" class="py-name" href="#" onclick="return doclink('link-2014', 'itersiblings', 'link-2010');">itersiblings</a></tt><tt class="py-op">(</tt><tt class="py-name">preceding</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5844 </div><a name="L1800"></a><tt class="py-lineno">1800</tt> <tt class="py-line"> </tt>
5845 <a name="ETreeOnlyTestCase.test_itersiblings_tag"></a><div id="ETreeOnlyTestCase.test_itersiblings_tag-def"><a name="L1801"></a><tt class="py-lineno">1801</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_itersiblings_tag-toggle" onclick="return toggle('ETreeOnlyTestCase.test_itersiblings_tag');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_itersiblings_tag">test_itersiblings_tag</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5846 </div><div id="ETreeOnlyTestCase.test_itersiblings_tag-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_itersiblings_tag-expanded"><a name="L1802"></a><tt class="py-lineno">1802</tt> <tt class="py-line"> <tt id="link-2015" class="py-name"><a title="lxml.cssselect.Element
5849 lxml.objectify.Element
5850 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5851 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2015', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2016" class="py-name"><a title="lxml.etree
5852 lxml.sax.ElementTreeContentHandler.etree
5853 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5854 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5855 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2016', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2017" class="py-name"><a title="lxml.cssselect.Element
5858 lxml.objectify.Element
5859 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5860 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2017', 'Element', 'link-69');">Element</a></tt> </tt>
5861 <a name="L1803"></a><tt class="py-lineno">1803</tt> <tt class="py-line"> <tt id="link-2018" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2018', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2019" class="py-name"><a title="lxml.etree
5862 lxml.sax.ElementTreeContentHandler.etree
5863 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5864 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5865 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2019', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2020" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2020', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
5866 <a name="L1804"></a><tt class="py-lineno">1804</tt> <tt class="py-line"> </tt>
5867 <a name="L1805"></a><tt class="py-lineno">1805</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-2021" class="py-name"><a title="lxml.cssselect.Element
5870 lxml.objectify.Element
5871 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
5872 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2021', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
5873 <a name="L1806"></a><tt class="py-lineno">1806</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-2022" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2022', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
5874 <a name="L1807"></a><tt class="py-lineno">1807</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-2023" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2023', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
5875 <a name="L1808"></a><tt class="py-lineno">1808</tt> <tt class="py-line"> <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt id="link-2024" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2024', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">,</tt> <tt class="py-string">'d'</tt><tt class="py-op">)</tt> </tt>
5876 <a name="L1809"></a><tt class="py-lineno">1809</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5877 <a name="L1810"></a><tt class="py-lineno">1810</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
5878 <a name="L1811"></a><tt class="py-lineno">1811</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-2025" class="py-name"><a title="lxml.etree._Element.itersiblings" class="py-name" href="#" onclick="return doclink('link-2025', 'itersiblings', 'link-2010');">itersiblings</a></tt><tt class="py-op">(</tt><tt id="link-2026" class="py-name"><a title="lxml.etree._Comment.tag
5879 lxml.etree._Element.tag
5880 lxml.etree._Entity.tag
5881 lxml.etree._ProcessingInstruction.tag
5882 lxml.etree._ReadOnlyProxy.tag
5883 lxml.tests.test_xpathevaluator.tag
5884 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-2026', 'tag', 'link-73');">tag</a></tt><tt class="py-op">=</tt><tt class="py-string">'XXX'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5885 <a name="L1812"></a><tt class="py-lineno">1812</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5886 <a name="L1813"></a><tt class="py-lineno">1813</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">c</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
5887 <a name="L1814"></a><tt class="py-lineno">1814</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">.</tt><tt id="link-2027" class="py-name"><a title="lxml.etree._Element.itersiblings" class="py-name" href="#" onclick="return doclink('link-2027', 'itersiblings', 'link-2010');">itersiblings</a></tt><tt class="py-op">(</tt><tt id="link-2028" class="py-name"><a title="lxml.etree._Comment.tag
5888 lxml.etree._Element.tag
5889 lxml.etree._Entity.tag
5890 lxml.etree._ProcessingInstruction.tag
5891 lxml.etree._ReadOnlyProxy.tag
5892 lxml.tests.test_xpathevaluator.tag
5893 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-2028', 'tag', 'link-73');">tag</a></tt><tt class="py-op">=</tt><tt class="py-string">'c'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5894 <a name="L1815"></a><tt class="py-lineno">1815</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5895 <a name="L1816"></a><tt class="py-lineno">1816</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">b</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
5896 <a name="L1817"></a><tt class="py-lineno">1817</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-2029" class="py-name"><a title="lxml.etree._Element.itersiblings" class="py-name" href="#" onclick="return doclink('link-2029', 'itersiblings', 'link-2010');">itersiblings</a></tt><tt class="py-op">(</tt><tt class="py-name">preceding</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> <tt id="link-2030" class="py-name"><a title="lxml.etree._Comment.tag
5897 lxml.etree._Element.tag
5898 lxml.etree._Entity.tag
5899 lxml.etree._ProcessingInstruction.tag
5900 lxml.etree._ReadOnlyProxy.tag
5901 lxml.tests.test_xpathevaluator.tag
5902 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-2030', 'tag', 'link-73');">tag</a></tt><tt class="py-op">=</tt><tt class="py-string">'b'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5903 <a name="L1818"></a><tt class="py-lineno">1818</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
5904 <a name="L1819"></a><tt class="py-lineno">1819</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
5905 <a name="L1820"></a><tt class="py-lineno">1820</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-2031" class="py-name"><a title="lxml.etree._Element.itersiblings" class="py-name" href="#" onclick="return doclink('link-2031', 'itersiblings', 'link-2010');">itersiblings</a></tt><tt class="py-op">(</tt><tt class="py-name">preceding</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> <tt id="link-2032" class="py-name"><a title="lxml.etree._Comment.tag
5906 lxml.etree._Element.tag
5907 lxml.etree._Entity.tag
5908 lxml.etree._ProcessingInstruction.tag
5909 lxml.etree._ReadOnlyProxy.tag
5910 lxml.tests.test_xpathevaluator.tag
5911 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-2032', 'tag', 'link-73');">tag</a></tt><tt class="py-op">=</tt><tt class="py-string">'c'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5912 </div><a name="L1821"></a><tt class="py-lineno">1821</tt> <tt class="py-line"> </tt>
5913 <a name="ETreeOnlyTestCase.test_parseid"></a><div id="ETreeOnlyTestCase.test_parseid-def"><a name="L1822"></a><tt class="py-lineno">1822</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_parseid-toggle" onclick="return toggle('ETreeOnlyTestCase.test_parseid');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parseid">test_parseid</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5914 </div><div id="ETreeOnlyTestCase.test_parseid-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_parseid-expanded"><a name="L1823"></a><tt class="py-lineno">1823</tt> <tt class="py-line"> <tt id="link-2033" class="py-name" targets="Function lxml.etree.parseid()=lxml.etree-module.html#parseid"><a title="lxml.etree.parseid" class="py-name" href="#" onclick="return doclink('link-2033', 'parseid', 'link-2033');">parseid</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2034" class="py-name"><a title="lxml.etree
5915 lxml.sax.ElementTreeContentHandler.etree
5916 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5917 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5918 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2034', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2035" class="py-name"><a title="lxml.etree.parseid" class="py-name" href="#" onclick="return doclink('link-2035', 'parseid', 'link-2033');">parseid</a></tt> </tt>
5919 <a name="L1824"></a><tt class="py-lineno">1824</tt> <tt class="py-line"> <tt id="link-2036" class="py-name"><a title="lxml.etree.XML
5921 lxml.tests.test_objectify.ObjectifyTestCase.XML
5922 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2036', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2037" class="py-name"><a title="lxml.etree
5923 lxml.sax.ElementTreeContentHandler.etree
5924 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5925 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5926 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2037', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2038" class="py-name"><a title="lxml.etree.XML
5928 lxml.tests.test_objectify.ObjectifyTestCase.XML
5929 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2038', 'XML', 'link-217');">XML</a></tt> </tt>
5930 <a name="L1825"></a><tt class="py-lineno">1825</tt> <tt class="py-line"> <tt class="py-name">xml_text</tt> <tt class="py-op">=</tt> <tt id="link-2039" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2039', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'''</tt> </tt>
5931 <a name="L1826"></a><tt class="py-lineno">1826</tt> <tt class="py-line"><tt class="py-string"> <!DOCTYPE document [</tt> </tt>
5932 <a name="L1827"></a><tt class="py-lineno">1827</tt> <tt class="py-line"><tt class="py-string"> <!ELEMENT document (h1,p)*></tt> </tt>
5933 <a name="L1828"></a><tt class="py-lineno">1828</tt> <tt class="py-line"><tt class="py-string"> <!ELEMENT h1 (#PCDATA)></tt> </tt>
5934 <a name="L1829"></a><tt class="py-lineno">1829</tt> <tt class="py-line"><tt class="py-string"> <!ATTLIST h1 myid ID #REQUIRED></tt> </tt>
5935 <a name="L1830"></a><tt class="py-lineno">1830</tt> <tt class="py-line"><tt class="py-string"> <!ELEMENT p (#PCDATA)></tt> </tt>
5936 <a name="L1831"></a><tt class="py-lineno">1831</tt> <tt class="py-line"><tt class="py-string"> <!ATTLIST p someid ID #REQUIRED></tt> </tt>
5937 <a name="L1832"></a><tt class="py-lineno">1832</tt> <tt class="py-line"><tt class="py-string"> ]></tt> </tt>
5938 <a name="L1833"></a><tt class="py-lineno">1833</tt> <tt class="py-line"><tt class="py-string"> <document></tt> </tt>
5939 <a name="L1834"></a><tt class="py-lineno">1834</tt> <tt class="py-line"><tt class="py-string"> <h1 myid="chapter1">...</h1></tt> </tt>
5940 <a name="L1835"></a><tt class="py-lineno">1835</tt> <tt class="py-line"><tt class="py-string"> <p id="note1" class="note">...</p></tt> </tt>
5941 <a name="L1836"></a><tt class="py-lineno">1836</tt> <tt class="py-line"><tt class="py-string"> <p>Regular paragraph.</p></tt> </tt>
5942 <a name="L1837"></a><tt class="py-lineno">1837</tt> <tt class="py-line"><tt class="py-string"> <p xml:id="xmlid">XML:ID paragraph.</p></tt> </tt>
5943 <a name="L1838"></a><tt class="py-lineno">1838</tt> <tt class="py-line"><tt class="py-string"> <p someid="warn1" class="warning">...</p></tt> </tt>
5944 <a name="L1839"></a><tt class="py-lineno">1839</tt> <tt class="py-line"><tt class="py-string"> </document></tt> </tt>
5945 <a name="L1840"></a><tt class="py-lineno">1840</tt> <tt class="py-line"><tt class="py-string"> '''</tt><tt class="py-op">)</tt> </tt>
5946 <a name="L1841"></a><tt class="py-lineno">1841</tt> <tt class="py-line"> </tt>
5947 <a name="L1842"></a><tt class="py-lineno">1842</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">,</tt> <tt class="py-name">dic</tt> <tt class="py-op">=</tt> <tt id="link-2040" class="py-name"><a title="lxml.etree.parseid" class="py-name" href="#" onclick="return doclink('link-2040', 'parseid', 'link-2033');">parseid</a></tt><tt class="py-op">(</tt><tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-name">xml_text</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5948 <a name="L1843"></a><tt class="py-lineno">1843</tt> <tt class="py-line"> <tt id="link-2041" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2041', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-2042" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-2042', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
5949 <a name="L1844"></a><tt class="py-lineno">1844</tt> <tt class="py-line"> <tt class="py-name">root2</tt> <tt class="py-op">=</tt> <tt id="link-2043" class="py-name"><a title="lxml.etree.XML
5951 lxml.tests.test_objectify.ObjectifyTestCase.XML
5952 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2043', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt class="py-name">xml_text</tt><tt class="py-op">)</tt> </tt>
5953 <a name="L1845"></a><tt class="py-lineno">1845</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2044" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
5954 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-2044', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-2045" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2045', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
5955 <a name="L1846"></a><tt class="py-lineno">1846</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2046" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
5956 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-2046', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt class="py-name">root2</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
5957 <a name="L1847"></a><tt class="py-lineno">1847</tt> <tt class="py-line"> <tt class="py-name">expected</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt> </tt>
5958 <a name="L1848"></a><tt class="py-lineno">1848</tt> <tt class="py-line"> <tt class="py-string">"chapter1"</tt> <tt class="py-op">:</tt> <tt id="link-2047" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2047', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
5959 <a name="L1849"></a><tt class="py-lineno">1849</tt> <tt class="py-line"> <tt class="py-string">"xmlid"</tt> <tt class="py-op">:</tt> <tt id="link-2048" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2048', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
5960 <a name="L1850"></a><tt class="py-lineno">1850</tt> <tt class="py-line"> <tt class="py-string">"warn1"</tt> <tt class="py-op">:</tt> <tt id="link-2049" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2049', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">4</tt><tt class="py-op">]</tt> </tt>
5961 <a name="L1851"></a><tt class="py-lineno">1851</tt> <tt class="py-line"> <tt class="py-op">}</tt> </tt>
5962 <a name="L1852"></a><tt class="py-lineno">1852</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2050" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-2050', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-string">"chapter1"</tt> <tt class="py-keyword">in</tt> <tt class="py-name">dic</tt><tt class="py-op">)</tt> </tt>
5963 <a name="L1853"></a><tt class="py-lineno">1853</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2051" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-2051', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-string">"warn1"</tt> <tt class="py-keyword">in</tt> <tt class="py-name">dic</tt><tt class="py-op">)</tt> </tt>
5964 <a name="L1854"></a><tt class="py-lineno">1854</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2052" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-2052', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-string">"xmlid"</tt> <tt class="py-keyword">in</tt> <tt class="py-name">dic</tt><tt class="py-op">)</tt> </tt>
5965 <a name="L1855"></a><tt class="py-lineno">1855</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2053" class="py-name" targets="Method lxml.tests.test_etree.ETreeOnlyTestCase._checkIDDict()=lxml.tests.test_etree.ETreeOnlyTestCase-class.html#_checkIDDict"><a title="lxml.tests.test_etree.ETreeOnlyTestCase._checkIDDict" class="py-name" href="#" onclick="return doclink('link-2053', '_checkIDDict', 'link-2053');">_checkIDDict</a></tt><tt class="py-op">(</tt><tt class="py-name">dic</tt><tt class="py-op">,</tt> <tt class="py-name">expected</tt><tt class="py-op">)</tt> </tt>
5966 </div><a name="L1856"></a><tt class="py-lineno">1856</tt> <tt class="py-line"> </tt>
5967 <a name="ETreeOnlyTestCase.test_XMLDTDID"></a><div id="ETreeOnlyTestCase.test_XMLDTDID-def"><a name="L1857"></a><tt class="py-lineno">1857</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_XMLDTDID-toggle" onclick="return toggle('ETreeOnlyTestCase.test_XMLDTDID');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_XMLDTDID">test_XMLDTDID</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
5968 </div><div id="ETreeOnlyTestCase.test_XMLDTDID-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_XMLDTDID-expanded"><a name="L1858"></a><tt class="py-lineno">1858</tt> <tt class="py-line"> <tt id="link-2054" class="py-name" targets="Function lxml.etree.XMLDTDID()=lxml.etree-module.html#XMLDTDID"><a title="lxml.etree.XMLDTDID" class="py-name" href="#" onclick="return doclink('link-2054', 'XMLDTDID', 'link-2054');">XMLDTDID</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2055" class="py-name"><a title="lxml.etree
5969 lxml.sax.ElementTreeContentHandler.etree
5970 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5971 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5972 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2055', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2056" class="py-name"><a title="lxml.etree.XMLDTDID" class="py-name" href="#" onclick="return doclink('link-2056', 'XMLDTDID', 'link-2054');">XMLDTDID</a></tt> </tt>
5973 <a name="L1859"></a><tt class="py-lineno">1859</tt> <tt class="py-line"> <tt id="link-2057" class="py-name"><a title="lxml.etree.XML
5975 lxml.tests.test_objectify.ObjectifyTestCase.XML
5976 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2057', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2058" class="py-name"><a title="lxml.etree
5977 lxml.sax.ElementTreeContentHandler.etree
5978 lxml.tests.test_elementtree.CElementTreeTestCase.etree
5979 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
5980 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2058', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2059" class="py-name"><a title="lxml.etree.XML
5982 lxml.tests.test_objectify.ObjectifyTestCase.XML
5983 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2059', 'XML', 'link-217');">XML</a></tt> </tt>
5984 <a name="L1860"></a><tt class="py-lineno">1860</tt> <tt class="py-line"> <tt class="py-name">xml_text</tt> <tt class="py-op">=</tt> <tt id="link-2060" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2060', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'''</tt> </tt>
5985 <a name="L1861"></a><tt class="py-lineno">1861</tt> <tt class="py-line"><tt class="py-string"> <!DOCTYPE document [</tt> </tt>
5986 <a name="L1862"></a><tt class="py-lineno">1862</tt> <tt class="py-line"><tt class="py-string"> <!ELEMENT document (h1,p)*></tt> </tt>
5987 <a name="L1863"></a><tt class="py-lineno">1863</tt> <tt class="py-line"><tt class="py-string"> <!ELEMENT h1 (#PCDATA)></tt> </tt>
5988 <a name="L1864"></a><tt class="py-lineno">1864</tt> <tt class="py-line"><tt class="py-string"> <!ATTLIST h1 myid ID #REQUIRED></tt> </tt>
5989 <a name="L1865"></a><tt class="py-lineno">1865</tt> <tt class="py-line"><tt class="py-string"> <!ELEMENT p (#PCDATA)></tt> </tt>
5990 <a name="L1866"></a><tt class="py-lineno">1866</tt> <tt class="py-line"><tt class="py-string"> <!ATTLIST p someid ID #REQUIRED></tt> </tt>
5991 <a name="L1867"></a><tt class="py-lineno">1867</tt> <tt class="py-line"><tt class="py-string"> ]></tt> </tt>
5992 <a name="L1868"></a><tt class="py-lineno">1868</tt> <tt class="py-line"><tt class="py-string"> <document></tt> </tt>
5993 <a name="L1869"></a><tt class="py-lineno">1869</tt> <tt class="py-line"><tt class="py-string"> <h1 myid="chapter1">...</h1></tt> </tt>
5994 <a name="L1870"></a><tt class="py-lineno">1870</tt> <tt class="py-line"><tt class="py-string"> <p id="note1" class="note">...</p></tt> </tt>
5995 <a name="L1871"></a><tt class="py-lineno">1871</tt> <tt class="py-line"><tt class="py-string"> <p>Regular paragraph.</p></tt> </tt>
5996 <a name="L1872"></a><tt class="py-lineno">1872</tt> <tt class="py-line"><tt class="py-string"> <p xml:id="xmlid">XML:ID paragraph.</p></tt> </tt>
5997 <a name="L1873"></a><tt class="py-lineno">1873</tt> <tt class="py-line"><tt class="py-string"> <p someid="warn1" class="warning">...</p></tt> </tt>
5998 <a name="L1874"></a><tt class="py-lineno">1874</tt> <tt class="py-line"><tt class="py-string"> </document></tt> </tt>
5999 <a name="L1875"></a><tt class="py-lineno">1875</tt> <tt class="py-line"><tt class="py-string"> '''</tt><tt class="py-op">)</tt> </tt>
6000 <a name="L1876"></a><tt class="py-lineno">1876</tt> <tt class="py-line"> </tt>
6001 <a name="L1877"></a><tt class="py-lineno">1877</tt> <tt class="py-line"> <tt id="link-2061" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2061', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-name">dic</tt> <tt class="py-op">=</tt> <tt id="link-2062" class="py-name"><a title="lxml.etree.XMLDTDID" class="py-name" href="#" onclick="return doclink('link-2062', 'XMLDTDID', 'link-2054');">XMLDTDID</a></tt><tt class="py-op">(</tt><tt class="py-name">xml_text</tt><tt class="py-op">)</tt> </tt>
6002 <a name="L1878"></a><tt class="py-lineno">1878</tt> <tt class="py-line"> <tt class="py-name">root2</tt> <tt class="py-op">=</tt> <tt id="link-2063" class="py-name"><a title="lxml.etree.XML
6004 lxml.tests.test_objectify.ObjectifyTestCase.XML
6005 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2063', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt class="py-name">xml_text</tt><tt class="py-op">)</tt> </tt>
6006 <a name="L1879"></a><tt class="py-lineno">1879</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2064" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
6007 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-2064', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-2065" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2065', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
6008 <a name="L1880"></a><tt class="py-lineno">1880</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2066" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
6009 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-2066', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt class="py-name">root2</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6010 <a name="L1881"></a><tt class="py-lineno">1881</tt> <tt class="py-line"> <tt class="py-name">expected</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt> </tt>
6011 <a name="L1882"></a><tt class="py-lineno">1882</tt> <tt class="py-line"> <tt class="py-string">"chapter1"</tt> <tt class="py-op">:</tt> <tt id="link-2067" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2067', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
6012 <a name="L1883"></a><tt class="py-lineno">1883</tt> <tt class="py-line"> <tt class="py-string">"xmlid"</tt> <tt class="py-op">:</tt> <tt id="link-2068" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2068', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
6013 <a name="L1884"></a><tt class="py-lineno">1884</tt> <tt class="py-line"> <tt class="py-string">"warn1"</tt> <tt class="py-op">:</tt> <tt id="link-2069" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2069', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">4</tt><tt class="py-op">]</tt> </tt>
6014 <a name="L1885"></a><tt class="py-lineno">1885</tt> <tt class="py-line"> <tt class="py-op">}</tt> </tt>
6015 <a name="L1886"></a><tt class="py-lineno">1886</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2070" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-2070', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-string">"chapter1"</tt> <tt class="py-keyword">in</tt> <tt class="py-name">dic</tt><tt class="py-op">)</tt> </tt>
6016 <a name="L1887"></a><tt class="py-lineno">1887</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2071" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-2071', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-string">"warn1"</tt> <tt class="py-keyword">in</tt> <tt class="py-name">dic</tt><tt class="py-op">)</tt> </tt>
6017 <a name="L1888"></a><tt class="py-lineno">1888</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2072" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-2072', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-string">"xmlid"</tt> <tt class="py-keyword">in</tt> <tt class="py-name">dic</tt><tt class="py-op">)</tt> </tt>
6018 <a name="L1889"></a><tt class="py-lineno">1889</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2073" class="py-name"><a title="lxml.tests.test_etree.ETreeOnlyTestCase._checkIDDict" class="py-name" href="#" onclick="return doclink('link-2073', '_checkIDDict', 'link-2053');">_checkIDDict</a></tt><tt class="py-op">(</tt><tt class="py-name">dic</tt><tt class="py-op">,</tt> <tt class="py-name">expected</tt><tt class="py-op">)</tt> </tt>
6019 </div><a name="L1890"></a><tt class="py-lineno">1890</tt> <tt class="py-line"> </tt>
6020 <a name="ETreeOnlyTestCase.test_XMLDTDID_empty"></a><div id="ETreeOnlyTestCase.test_XMLDTDID_empty-def"><a name="L1891"></a><tt class="py-lineno">1891</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_XMLDTDID_empty-toggle" onclick="return toggle('ETreeOnlyTestCase.test_XMLDTDID_empty');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_XMLDTDID_empty">test_XMLDTDID_empty</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6021 </div><div id="ETreeOnlyTestCase.test_XMLDTDID_empty-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_XMLDTDID_empty-expanded"><a name="L1892"></a><tt class="py-lineno">1892</tt> <tt class="py-line"> <tt id="link-2074" class="py-name"><a title="lxml.etree.XMLDTDID" class="py-name" href="#" onclick="return doclink('link-2074', 'XMLDTDID', 'link-2054');">XMLDTDID</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2075" class="py-name"><a title="lxml.etree
6022 lxml.sax.ElementTreeContentHandler.etree
6023 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6024 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6025 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2075', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2076" class="py-name"><a title="lxml.etree.XMLDTDID" class="py-name" href="#" onclick="return doclink('link-2076', 'XMLDTDID', 'link-2054');">XMLDTDID</a></tt> </tt>
6026 <a name="L1893"></a><tt class="py-lineno">1893</tt> <tt class="py-line"> <tt id="link-2077" class="py-name"><a title="lxml.etree.XML
6028 lxml.tests.test_objectify.ObjectifyTestCase.XML
6029 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2077', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2078" class="py-name"><a title="lxml.etree
6030 lxml.sax.ElementTreeContentHandler.etree
6031 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6032 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6033 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2078', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2079" class="py-name"><a title="lxml.etree.XML
6035 lxml.tests.test_objectify.ObjectifyTestCase.XML
6036 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2079', 'XML', 'link-217');">XML</a></tt> </tt>
6037 <a name="L1894"></a><tt class="py-lineno">1894</tt> <tt class="py-line"> <tt class="py-name">xml_text</tt> <tt class="py-op">=</tt> <tt id="link-2080" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2080', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'''</tt> </tt>
6038 <a name="L1895"></a><tt class="py-lineno">1895</tt> <tt class="py-line"><tt class="py-string"> <document></tt> </tt>
6039 <a name="L1896"></a><tt class="py-lineno">1896</tt> <tt class="py-line"><tt class="py-string"> <h1 myid="chapter1">...</h1></tt> </tt>
6040 <a name="L1897"></a><tt class="py-lineno">1897</tt> <tt class="py-line"><tt class="py-string"> <p id="note1" class="note">...</p></tt> </tt>
6041 <a name="L1898"></a><tt class="py-lineno">1898</tt> <tt class="py-line"><tt class="py-string"> <p>Regular paragraph.</p></tt> </tt>
6042 <a name="L1899"></a><tt class="py-lineno">1899</tt> <tt class="py-line"><tt class="py-string"> <p someid="warn1" class="warning">...</p></tt> </tt>
6043 <a name="L1900"></a><tt class="py-lineno">1900</tt> <tt class="py-line"><tt class="py-string"> </document></tt> </tt>
6044 <a name="L1901"></a><tt class="py-lineno">1901</tt> <tt class="py-line"><tt class="py-string"> '''</tt><tt class="py-op">)</tt> </tt>
6045 <a name="L1902"></a><tt class="py-lineno">1902</tt> <tt class="py-line"> </tt>
6046 <a name="L1903"></a><tt class="py-lineno">1903</tt> <tt class="py-line"> <tt id="link-2081" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2081', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-name">dic</tt> <tt class="py-op">=</tt> <tt id="link-2082" class="py-name"><a title="lxml.etree.XMLDTDID" class="py-name" href="#" onclick="return doclink('link-2082', 'XMLDTDID', 'link-2054');">XMLDTDID</a></tt><tt class="py-op">(</tt><tt class="py-name">xml_text</tt><tt class="py-op">)</tt> </tt>
6047 <a name="L1904"></a><tt class="py-lineno">1904</tt> <tt class="py-line"> <tt class="py-name">root2</tt> <tt class="py-op">=</tt> <tt id="link-2083" class="py-name"><a title="lxml.etree.XML
6049 lxml.tests.test_objectify.ObjectifyTestCase.XML
6050 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2083', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt class="py-name">xml_text</tt><tt class="py-op">)</tt> </tt>
6051 <a name="L1905"></a><tt class="py-lineno">1905</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2084" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
6052 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-2084', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt id="link-2085" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2085', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
6053 <a name="L1906"></a><tt class="py-lineno">1906</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2086" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
6054 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-2086', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt class="py-name">root2</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6055 <a name="L1907"></a><tt class="py-lineno">1907</tt> <tt class="py-line"> <tt class="py-name">expected</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
6056 <a name="L1908"></a><tt class="py-lineno">1908</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2087" class="py-name"><a title="lxml.tests.test_etree.ETreeOnlyTestCase._checkIDDict" class="py-name" href="#" onclick="return doclink('link-2087', '_checkIDDict', 'link-2053');">_checkIDDict</a></tt><tt class="py-op">(</tt><tt class="py-name">dic</tt><tt class="py-op">,</tt> <tt class="py-name">expected</tt><tt class="py-op">)</tt> </tt>
6057 </div><a name="L1909"></a><tt class="py-lineno">1909</tt> <tt class="py-line"> </tt>
6058 <a name="ETreeOnlyTestCase._checkIDDict"></a><div id="ETreeOnlyTestCase._checkIDDict-def"><a name="L1910"></a><tt class="py-lineno">1910</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase._checkIDDict-toggle" onclick="return toggle('ETreeOnlyTestCase._checkIDDict');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#_checkIDDict">_checkIDDict</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">dic</tt><tt class="py-op">,</tt> <tt class="py-param">expected</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6059 </div><div id="ETreeOnlyTestCase._checkIDDict-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase._checkIDDict-expanded"><a name="L1911"></a><tt class="py-lineno">1911</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">dic</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
6060 <a name="L1912"></a><tt class="py-lineno">1912</tt> <tt class="py-line"> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">expected</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6061 <a name="L1913"></a><tt class="py-lineno">1913</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">dic</tt><tt class="py-op">.</tt><tt id="link-2088" class="py-name" targets="Method lxml.etree._Attrib.items()=lxml.etree._Attrib-class.html#items,Method lxml.etree._Element.items()=lxml.etree._Element-class.html#items,Method lxml.etree._IDDict.items()=lxml.etree._IDDict-class.html#items,Method lxml.etree._NamespaceRegistry.items()=lxml.etree._NamespaceRegistry-class.html#items,Method lxml.etree._ReadOnlyElementProxy.items()=lxml.etree._ReadOnlyElementProxy-class.html#items,Method lxml.etree.__ContentOnlyElement.items()=lxml.etree.__ContentOnlyElement-class.html#items"><a title="lxml.etree._Attrib.items
6062 lxml.etree._Element.items
6063 lxml.etree._IDDict.items
6064 lxml.etree._NamespaceRegistry.items
6065 lxml.etree._ReadOnlyElementProxy.items
6066 lxml.etree.__ContentOnlyElement.items" class="py-name" href="#" onclick="return doclink('link-2088', 'items', 'link-2088');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
6067 <a name="L1914"></a><tt class="py-lineno">1914</tt> <tt class="py-line"> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">expected</tt><tt class="py-op">.</tt><tt id="link-2089" class="py-name"><a title="lxml.etree._Attrib.items
6068 lxml.etree._Element.items
6069 lxml.etree._IDDict.items
6070 lxml.etree._NamespaceRegistry.items
6071 lxml.etree._ReadOnlyElementProxy.items
6072 lxml.etree.__ContentOnlyElement.items" class="py-name" href="#" onclick="return doclink('link-2089', 'items', 'link-2088');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6073 <a name="L1915"></a><tt class="py-lineno">1915</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">version_info</tt> <tt class="py-op"><</tt> <tt class="py-op">(</tt><tt class="py-number">3</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6074 <a name="L1916"></a><tt class="py-lineno">1916</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">dic</tt><tt class="py-op">.</tt><tt id="link-2090" class="py-name" targets="Method lxml.etree._Attrib.iteritems()=lxml.etree._Attrib-class.html#iteritems,Method lxml.etree._IDDict.iteritems()=lxml.etree._IDDict-class.html#iteritems,Method lxml.etree._NamespaceRegistry.iteritems()=lxml.etree._NamespaceRegistry-class.html#iteritems"><a title="lxml.etree._Attrib.iteritems
6075 lxml.etree._IDDict.iteritems
6076 lxml.etree._NamespaceRegistry.iteritems" class="py-name" href="#" onclick="return doclink('link-2090', 'iteritems', 'link-2090');">iteritems</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
6077 <a name="L1917"></a><tt class="py-lineno">1917</tt> <tt class="py-line"> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">expected</tt><tt class="py-op">.</tt><tt id="link-2091" class="py-name"><a title="lxml.etree._Attrib.iteritems
6078 lxml.etree._IDDict.iteritems
6079 lxml.etree._NamespaceRegistry.iteritems" class="py-name" href="#" onclick="return doclink('link-2091', 'iteritems', 'link-2090');">iteritems</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6080 <a name="L1918"></a><tt class="py-lineno">1918</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">dic</tt><tt class="py-op">.</tt><tt id="link-2092" class="py-name" targets="Method lxml.etree._Attrib.keys()=lxml.etree._Attrib-class.html#keys,Method lxml.etree._Element.keys()=lxml.etree._Element-class.html#keys,Method lxml.etree._IDDict.keys()=lxml.etree._IDDict-class.html#keys,Method lxml.etree._ReadOnlyElementProxy.keys()=lxml.etree._ReadOnlyElementProxy-class.html#keys,Method lxml.etree.__ContentOnlyElement.keys()=lxml.etree.__ContentOnlyElement-class.html#keys,Method lxml.html.FieldsDict.keys()=lxml.html.FieldsDict-class.html#keys,Method lxml.html.InputGetter.keys()=lxml.html.InputGetter-class.html#keys"><a title="lxml.etree._Attrib.keys
6081 lxml.etree._Element.keys
6082 lxml.etree._IDDict.keys
6083 lxml.etree._ReadOnlyElementProxy.keys
6084 lxml.etree.__ContentOnlyElement.keys
6085 lxml.html.FieldsDict.keys
6086 lxml.html.InputGetter.keys" class="py-name" href="#" onclick="return doclink('link-2092', 'keys', 'link-2092');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
6087 <a name="L1919"></a><tt class="py-lineno">1919</tt> <tt class="py-line"> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">expected</tt><tt class="py-op">.</tt><tt id="link-2093" class="py-name"><a title="lxml.etree._Attrib.keys
6088 lxml.etree._Element.keys
6089 lxml.etree._IDDict.keys
6090 lxml.etree._ReadOnlyElementProxy.keys
6091 lxml.etree.__ContentOnlyElement.keys
6092 lxml.html.FieldsDict.keys
6093 lxml.html.InputGetter.keys" class="py-name" href="#" onclick="return doclink('link-2093', 'keys', 'link-2092');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6094 <a name="L1920"></a><tt class="py-lineno">1920</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">version_info</tt> <tt class="py-op"><</tt> <tt class="py-op">(</tt><tt class="py-number">3</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6095 <a name="L1921"></a><tt class="py-lineno">1921</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">dic</tt><tt class="py-op">.</tt><tt id="link-2094" class="py-name" targets="Method lxml.etree._Attrib.iterkeys()=lxml.etree._Attrib-class.html#iterkeys,Method lxml.etree._IDDict.iterkeys()=lxml.etree._IDDict-class.html#iterkeys"><a title="lxml.etree._Attrib.iterkeys
6096 lxml.etree._IDDict.iterkeys" class="py-name" href="#" onclick="return doclink('link-2094', 'iterkeys', 'link-2094');">iterkeys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
6097 <a name="L1922"></a><tt class="py-lineno">1922</tt> <tt class="py-line"> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">expected</tt><tt class="py-op">.</tt><tt id="link-2095" class="py-name"><a title="lxml.etree._Attrib.iterkeys
6098 lxml.etree._IDDict.iterkeys" class="py-name" href="#" onclick="return doclink('link-2095', 'iterkeys', 'link-2094');">iterkeys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6099 <a name="L1923"></a><tt class="py-lineno">1923</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">version_info</tt> <tt class="py-op"><</tt> <tt class="py-op">(</tt><tt class="py-number">3</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6100 <a name="L1924"></a><tt class="py-lineno">1924</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">dic</tt><tt class="py-op">.</tt><tt id="link-2096" class="py-name"><a title="lxml.etree._Attrib.values
6101 lxml.etree._Element.values
6102 lxml.etree._IDDict.values
6103 lxml.etree._ReadOnlyElementProxy.values
6104 lxml.etree.__ContentOnlyElement.values" class="py-name" href="#" onclick="return doclink('link-2096', 'values', 'link-1783');">values</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
6105 <a name="L1925"></a><tt class="py-lineno">1925</tt> <tt class="py-line"> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">expected</tt><tt class="py-op">.</tt><tt id="link-2097" class="py-name"><a title="lxml.etree._Attrib.values
6106 lxml.etree._Element.values
6107 lxml.etree._IDDict.values
6108 lxml.etree._ReadOnlyElementProxy.values
6109 lxml.etree.__ContentOnlyElement.values" class="py-name" href="#" onclick="return doclink('link-2097', 'values', 'link-1783');">values</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6110 <a name="L1926"></a><tt class="py-lineno">1926</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">dic</tt><tt class="py-op">.</tt><tt id="link-2098" class="py-name" targets="Method lxml.etree._Attrib.itervalues()=lxml.etree._Attrib-class.html#itervalues,Method lxml.etree._IDDict.itervalues()=lxml.etree._IDDict-class.html#itervalues"><a title="lxml.etree._Attrib.itervalues
6111 lxml.etree._IDDict.itervalues" class="py-name" href="#" onclick="return doclink('link-2098', 'itervalues', 'link-2098');">itervalues</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
6112 <a name="L1927"></a><tt class="py-lineno">1927</tt> <tt class="py-line"> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">expected</tt><tt class="py-op">.</tt><tt id="link-2099" class="py-name"><a title="lxml.etree._Attrib.itervalues
6113 lxml.etree._IDDict.itervalues" class="py-name" href="#" onclick="return doclink('link-2099', 'itervalues', 'link-2098');">itervalues</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6114 </div><a name="L1928"></a><tt class="py-lineno">1928</tt> <tt class="py-line"> </tt>
6115 <a name="ETreeOnlyTestCase.test_namespaces"></a><div id="ETreeOnlyTestCase.test_namespaces-def"><a name="L1929"></a><tt class="py-lineno">1929</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_namespaces-toggle" onclick="return toggle('ETreeOnlyTestCase.test_namespaces');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespaces">test_namespaces</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6116 </div><div id="ETreeOnlyTestCase.test_namespaces-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_namespaces-expanded"><a name="L1930"></a><tt class="py-lineno">1930</tt> <tt class="py-line"> <tt id="link-2100" class="py-name"><a title="lxml.etree
6117 lxml.sax.ElementTreeContentHandler.etree
6118 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6119 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6120 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2100', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2101" class="py-name"><a title="lxml.etree
6121 lxml.sax.ElementTreeContentHandler.etree
6122 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6123 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6124 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2101', 'etree', 'link-10');">etree</a></tt> </tt>
6125 <a name="L1931"></a><tt class="py-lineno">1931</tt> <tt class="py-line"> </tt>
6126 <a name="L1932"></a><tt class="py-lineno">1932</tt> <tt class="py-line"> <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-string">'foo'</tt><tt class="py-op">:</tt> <tt class="py-string">'http://ns.infrae.com/foo'</tt><tt class="py-op">}</tt> </tt>
6127 <a name="L1933"></a><tt class="py-lineno">1933</tt> <tt class="py-line"> <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt id="link-2102" class="py-name"><a title="lxml.etree
6128 lxml.sax.ElementTreeContentHandler.etree
6129 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6130 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6131 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2102', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2103" class="py-name"><a title="lxml.cssselect.Element
6134 lxml.objectify.Element
6135 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6136 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2103', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'{http://ns.infrae.com/foo}bar'</tt><tt class="py-op">,</tt> <tt id="link-2104" class="py-name"><a title="lxml.etree._Element.nsmap" class="py-name" href="#" onclick="return doclink('link-2104', 'nsmap', 'link-191');">nsmap</a></tt><tt class="py-op">=</tt><tt class="py-name">r</tt><tt class="py-op">)</tt> </tt>
6137 <a name="L1934"></a><tt class="py-lineno">1934</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6138 <a name="L1935"></a><tt class="py-lineno">1935</tt> <tt class="py-line"> <tt class="py-string">'foo'</tt><tt class="py-op">,</tt> </tt>
6139 <a name="L1936"></a><tt class="py-lineno">1936</tt> <tt class="py-line"> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-2105" class="py-name"><a title="lxml.etree._Element.prefix
6140 lxml.etree._ReadOnlyElementProxy.prefix
6141 lxml.etree._XPathFunctionNamespaceRegistry.prefix" class="py-name" href="#" onclick="return doclink('link-2105', 'prefix', 'link-1837');">prefix</a></tt><tt class="py-op">)</tt> </tt>
6142 <a name="L1937"></a><tt class="py-lineno">1937</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6143 <a name="L1938"></a><tt class="py-lineno">1938</tt> <tt class="py-line"> <tt id="link-2106" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2106', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<foo:bar xmlns:foo="http://ns.infrae.com/foo"></foo:bar>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
6144 <a name="L1939"></a><tt class="py-lineno">1939</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2107" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
6145 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-2107', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6146 </div><a name="L1940"></a><tt class="py-lineno">1940</tt> <tt class="py-line"> </tt>
6147 <a name="ETreeOnlyTestCase.test_namespaces_default"></a><div id="ETreeOnlyTestCase.test_namespaces_default-def"><a name="L1941"></a><tt class="py-lineno">1941</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_namespaces_default-toggle" onclick="return toggle('ETreeOnlyTestCase.test_namespaces_default');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespaces_default">test_namespaces_default</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6148 </div><div id="ETreeOnlyTestCase.test_namespaces_default-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_namespaces_default-expanded"><a name="L1942"></a><tt class="py-lineno">1942</tt> <tt class="py-line"> <tt id="link-2108" class="py-name"><a title="lxml.etree
6149 lxml.sax.ElementTreeContentHandler.etree
6150 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6151 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6152 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2108', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2109" class="py-name"><a title="lxml.etree
6153 lxml.sax.ElementTreeContentHandler.etree
6154 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6155 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6156 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2109', 'etree', 'link-10');">etree</a></tt> </tt>
6157 <a name="L1943"></a><tt class="py-lineno">1943</tt> <tt class="py-line"> </tt>
6158 <a name="L1944"></a><tt class="py-lineno">1944</tt> <tt class="py-line"> <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> <tt class="py-string">'http://ns.infrae.com/foo'</tt><tt class="py-op">}</tt> </tt>
6159 <a name="L1945"></a><tt class="py-lineno">1945</tt> <tt class="py-line"> <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt id="link-2110" class="py-name"><a title="lxml.etree
6160 lxml.sax.ElementTreeContentHandler.etree
6161 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6162 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6163 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2110', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2111" class="py-name"><a title="lxml.cssselect.Element
6166 lxml.objectify.Element
6167 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6168 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2111', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'{http://ns.infrae.com/foo}bar'</tt><tt class="py-op">,</tt> <tt id="link-2112" class="py-name"><a title="lxml.etree._Element.nsmap" class="py-name" href="#" onclick="return doclink('link-2112', 'nsmap', 'link-191');">nsmap</a></tt><tt class="py-op">=</tt><tt class="py-name">r</tt><tt class="py-op">)</tt> </tt>
6169 <a name="L1946"></a><tt class="py-lineno">1946</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6170 <a name="L1947"></a><tt class="py-lineno">1947</tt> <tt class="py-line"> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
6171 <a name="L1948"></a><tt class="py-lineno">1948</tt> <tt class="py-line"> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-2113" class="py-name"><a title="lxml.etree._Element.prefix
6172 lxml.etree._ReadOnlyElementProxy.prefix
6173 lxml.etree._XPathFunctionNamespaceRegistry.prefix" class="py-name" href="#" onclick="return doclink('link-2113', 'prefix', 'link-1837');">prefix</a></tt><tt class="py-op">)</tt> </tt>
6174 <a name="L1949"></a><tt class="py-lineno">1949</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6175 <a name="L1950"></a><tt class="py-lineno">1950</tt> <tt class="py-line"> <tt class="py-string">'{http://ns.infrae.com/foo}bar'</tt><tt class="py-op">,</tt> </tt>
6176 <a name="L1951"></a><tt class="py-lineno">1951</tt> <tt class="py-line"> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-2114" class="py-name"><a title="lxml.etree._Comment.tag
6177 lxml.etree._Element.tag
6178 lxml.etree._Entity.tag
6179 lxml.etree._ProcessingInstruction.tag
6180 lxml.etree._ReadOnlyProxy.tag
6181 lxml.tests.test_xpathevaluator.tag
6182 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-2114', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
6183 <a name="L1952"></a><tt class="py-lineno">1952</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6184 <a name="L1953"></a><tt class="py-lineno">1953</tt> <tt class="py-line"> <tt id="link-2115" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2115', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<bar xmlns="http://ns.infrae.com/foo"></bar>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
6185 <a name="L1954"></a><tt class="py-lineno">1954</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2116" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
6186 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-2116', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6187 </div><a name="L1955"></a><tt class="py-lineno">1955</tt> <tt class="py-line"> </tt>
6188 <a name="ETreeOnlyTestCase.test_namespaces_default_and_attr"></a><div id="ETreeOnlyTestCase.test_namespaces_default_and_attr-def"><a name="L1956"></a><tt class="py-lineno">1956</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_namespaces_default_and_attr-toggle" onclick="return toggle('ETreeOnlyTestCase.test_namespaces_default_and_attr');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespaces_default_and_attr">test_namespaces_default_and_attr</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6189 </div><div id="ETreeOnlyTestCase.test_namespaces_default_and_attr-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_namespaces_default_and_attr-expanded"><a name="L1957"></a><tt class="py-lineno">1957</tt> <tt class="py-line"> <tt id="link-2117" class="py-name"><a title="lxml.etree
6190 lxml.sax.ElementTreeContentHandler.etree
6191 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6192 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6193 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2117', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2118" class="py-name"><a title="lxml.etree
6194 lxml.sax.ElementTreeContentHandler.etree
6195 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6196 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6197 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2118', 'etree', 'link-10');">etree</a></tt> </tt>
6198 <a name="L1958"></a><tt class="py-lineno">1958</tt> <tt class="py-line"> </tt>
6199 <a name="L1959"></a><tt class="py-lineno">1959</tt> <tt class="py-line"> <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> <tt class="py-string">'http://ns.infrae.com/foo'</tt><tt class="py-op">,</tt> </tt>
6200 <a name="L1960"></a><tt class="py-lineno">1960</tt> <tt class="py-line"> <tt class="py-string">'hoi'</tt><tt class="py-op">:</tt> <tt class="py-string">'http://ns.infrae.com/hoi'</tt><tt class="py-op">}</tt> </tt>
6201 <a name="L1961"></a><tt class="py-lineno">1961</tt> <tt class="py-line"> <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt id="link-2119" class="py-name"><a title="lxml.etree
6202 lxml.sax.ElementTreeContentHandler.etree
6203 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6204 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6205 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2119', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2120" class="py-name"><a title="lxml.cssselect.Element
6208 lxml.objectify.Element
6209 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6210 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2120', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'{http://ns.infrae.com/foo}bar'</tt><tt class="py-op">,</tt> <tt id="link-2121" class="py-name"><a title="lxml.etree._Element.nsmap" class="py-name" href="#" onclick="return doclink('link-2121', 'nsmap', 'link-191');">nsmap</a></tt><tt class="py-op">=</tt><tt class="py-name">r</tt><tt class="py-op">)</tt> </tt>
6211 <a name="L1962"></a><tt class="py-lineno">1962</tt> <tt class="py-line"> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-2122" class="py-name"><a title="lxml.etree._Element.set
6212 lxml.etree._XSLTProcessingInstruction.set
6213 lxml.etree.__ContentOnlyElement.set" class="py-name" href="#" onclick="return doclink('link-2122', 'set', 'link-241');">set</a></tt><tt class="py-op">(</tt><tt class="py-string">'{http://ns.infrae.com/hoi}test'</tt><tt class="py-op">,</tt> <tt class="py-string">'value'</tt><tt class="py-op">)</tt> </tt>
6214 <a name="L1963"></a><tt class="py-lineno">1963</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6215 <a name="L1964"></a><tt class="py-lineno">1964</tt> <tt class="py-line"> <tt id="link-2123" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2123', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<bar xmlns="http://ns.infrae.com/foo" xmlns:hoi="http://ns.infrae.com/hoi" hoi:test="value"></bar>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
6216 <a name="L1965"></a><tt class="py-lineno">1965</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2124" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
6217 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-2124', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6218 </div><a name="L1966"></a><tt class="py-lineno">1966</tt> <tt class="py-line"> </tt>
6219 <a name="ETreeOnlyTestCase.test_namespaces_elementtree"></a><div id="ETreeOnlyTestCase.test_namespaces_elementtree-def"><a name="L1967"></a><tt class="py-lineno">1967</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_namespaces_elementtree-toggle" onclick="return toggle('ETreeOnlyTestCase.test_namespaces_elementtree');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespaces_elementtree">test_namespaces_elementtree</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6220 </div><div id="ETreeOnlyTestCase.test_namespaces_elementtree-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_namespaces_elementtree-expanded"><a name="L1968"></a><tt class="py-lineno">1968</tt> <tt class="py-line"> <tt id="link-2125" class="py-name"><a title="lxml.etree
6221 lxml.sax.ElementTreeContentHandler.etree
6222 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6223 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6224 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2125', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2126" class="py-name"><a title="lxml.etree
6225 lxml.sax.ElementTreeContentHandler.etree
6226 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6227 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6228 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2126', 'etree', 'link-10');">etree</a></tt> </tt>
6229 <a name="L1969"></a><tt class="py-lineno">1969</tt> <tt class="py-line"> <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> <tt class="py-string">'http://ns.infrae.com/foo'</tt><tt class="py-op">,</tt> </tt>
6230 <a name="L1970"></a><tt class="py-lineno">1970</tt> <tt class="py-line"> <tt class="py-string">'hoi'</tt><tt class="py-op">:</tt> <tt class="py-string">'http://ns.infrae.com/hoi'</tt><tt class="py-op">}</tt> </tt>
6231 <a name="L1971"></a><tt class="py-lineno">1971</tt> <tt class="py-line"> <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt id="link-2127" class="py-name"><a title="lxml.etree
6232 lxml.sax.ElementTreeContentHandler.etree
6233 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6234 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6235 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2127', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2128" class="py-name"><a title="lxml.cssselect.Element
6238 lxml.objectify.Element
6239 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6240 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2128', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'{http://ns.infrae.com/foo}z'</tt><tt class="py-op">,</tt> <tt id="link-2129" class="py-name"><a title="lxml.etree._Element.nsmap" class="py-name" href="#" onclick="return doclink('link-2129', 'nsmap', 'link-191');">nsmap</a></tt><tt class="py-op">=</tt><tt class="py-name">r</tt><tt class="py-op">)</tt> </tt>
6241 <a name="L1972"></a><tt class="py-lineno">1972</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-2130" class="py-name"><a title="lxml.etree
6242 lxml.sax.ElementTreeContentHandler.etree
6243 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6244 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6245 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2130', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2131" class="py-name"><a title="lxml.etree.ElementTree
6246 xml.etree.ElementTree
6247 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-2131', 'ElementTree', 'link-468');">ElementTree</a></tt><tt class="py-op">(</tt><tt class="py-name">element</tt><tt class="py-op">=</tt><tt class="py-name">e</tt><tt class="py-op">)</tt> </tt>
6248 <a name="L1973"></a><tt class="py-lineno">1973</tt> <tt class="py-line"> <tt id="link-2132" class="py-name"><a title="lxml.etree
6249 lxml.sax.ElementTreeContentHandler.etree
6250 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6251 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6252 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2132', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2133" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2133', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">,</tt> <tt class="py-string">'{http://ns.infrae.com/hoi}x'</tt><tt class="py-op">)</tt> </tt>
6253 <a name="L1974"></a><tt class="py-lineno">1974</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6254 <a name="L1975"></a><tt class="py-lineno">1975</tt> <tt class="py-line"> <tt id="link-2134" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2134', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<z xmlns="http://ns.infrae.com/foo" xmlns:hoi="http://ns.infrae.com/hoi"><hoi:x></hoi:x></z>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
6255 <a name="L1976"></a><tt class="py-lineno">1976</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2135" class="py-name"><a title="lxml.tests.test_elementtree.ETreeTestCaseBase._writeElement
6256 lxml.tests.test_etree.ETreeOnlyTestCase._writeElement" class="py-name" href="#" onclick="return doclink('link-2135', '_writeElement', 'link-265');">_writeElement</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6257 </div><a name="L1977"></a><tt class="py-lineno">1977</tt> <tt class="py-line"> </tt>
6258 <a name="ETreeOnlyTestCase.test_namespaces_default_copy_element"></a><div id="ETreeOnlyTestCase.test_namespaces_default_copy_element-def"><a name="L1978"></a><tt class="py-lineno">1978</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_namespaces_default_copy_element-toggle" onclick="return toggle('ETreeOnlyTestCase.test_namespaces_default_copy_element');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespaces_default_copy_element">test_namespaces_default_copy_element</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6259 </div><div id="ETreeOnlyTestCase.test_namespaces_default_copy_element-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_namespaces_default_copy_element-expanded"><a name="L1979"></a><tt class="py-lineno">1979</tt> <tt class="py-line"> <tt id="link-2136" class="py-name"><a title="lxml.etree
6260 lxml.sax.ElementTreeContentHandler.etree
6261 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6262 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6263 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2136', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2137" class="py-name"><a title="lxml.etree
6264 lxml.sax.ElementTreeContentHandler.etree
6265 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6266 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6267 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2137', 'etree', 'link-10');">etree</a></tt> </tt>
6268 <a name="L1980"></a><tt class="py-lineno">1980</tt> <tt class="py-line"> </tt>
6269 <a name="L1981"></a><tt class="py-lineno">1981</tt> <tt class="py-line"> <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> <tt class="py-string">'http://ns.infrae.com/foo'</tt><tt class="py-op">}</tt> </tt>
6270 <a name="L1982"></a><tt class="py-lineno">1982</tt> <tt class="py-line"> <tt class="py-name">e1</tt> <tt class="py-op">=</tt> <tt id="link-2138" class="py-name"><a title="lxml.etree
6271 lxml.sax.ElementTreeContentHandler.etree
6272 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6273 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6274 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2138', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2139" class="py-name"><a title="lxml.cssselect.Element
6277 lxml.objectify.Element
6278 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6279 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2139', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'{http://ns.infrae.com/foo}bar'</tt><tt class="py-op">,</tt> <tt id="link-2140" class="py-name"><a title="lxml.etree._Element.nsmap" class="py-name" href="#" onclick="return doclink('link-2140', 'nsmap', 'link-191');">nsmap</a></tt><tt class="py-op">=</tt><tt class="py-name">r</tt><tt class="py-op">)</tt> </tt>
6280 <a name="L1983"></a><tt class="py-lineno">1983</tt> <tt class="py-line"> <tt class="py-name">e2</tt> <tt class="py-op">=</tt> <tt id="link-2141" class="py-name"><a title="lxml.etree
6281 lxml.sax.ElementTreeContentHandler.etree
6282 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6283 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6284 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2141', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2142" class="py-name"><a title="lxml.cssselect.Element
6287 lxml.objectify.Element
6288 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6289 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2142', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'{http://ns.infrae.com/foo}bar'</tt><tt class="py-op">,</tt> <tt id="link-2143" class="py-name"><a title="lxml.etree._Element.nsmap" class="py-name" href="#" onclick="return doclink('link-2143', 'nsmap', 'link-191');">nsmap</a></tt><tt class="py-op">=</tt><tt class="py-name">r</tt><tt class="py-op">)</tt> </tt>
6290 <a name="L1984"></a><tt class="py-lineno">1984</tt> <tt class="py-line"> </tt>
6291 <a name="L1985"></a><tt class="py-lineno">1985</tt> <tt class="py-line"> <tt class="py-name">e1</tt><tt class="py-op">.</tt><tt id="link-2144" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
6292 lxml.etree._Element.append
6293 lxml.etree._OpaqueDocumentWrapper.append
6294 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-2144', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">e2</tt><tt class="py-op">)</tt> </tt>
6295 <a name="L1986"></a><tt class="py-lineno">1986</tt> <tt class="py-line"> </tt>
6296 <a name="L1987"></a><tt class="py-lineno">1987</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6297 <a name="L1988"></a><tt class="py-lineno">1988</tt> <tt class="py-line"> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
6298 <a name="L1989"></a><tt class="py-lineno">1989</tt> <tt class="py-line"> <tt class="py-name">e1</tt><tt class="py-op">.</tt><tt id="link-2145" class="py-name"><a title="lxml.etree._Element.prefix
6299 lxml.etree._ReadOnlyElementProxy.prefix
6300 lxml.etree._XPathFunctionNamespaceRegistry.prefix" class="py-name" href="#" onclick="return doclink('link-2145', 'prefix', 'link-1837');">prefix</a></tt><tt class="py-op">)</tt> </tt>
6301 <a name="L1990"></a><tt class="py-lineno">1990</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6302 <a name="L1991"></a><tt class="py-lineno">1991</tt> <tt class="py-line"> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
6303 <a name="L1992"></a><tt class="py-lineno">1992</tt> <tt class="py-line"> <tt class="py-name">e1</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-2146" class="py-name"><a title="lxml.etree._Element.prefix
6304 lxml.etree._ReadOnlyElementProxy.prefix
6305 lxml.etree._XPathFunctionNamespaceRegistry.prefix" class="py-name" href="#" onclick="return doclink('link-2146', 'prefix', 'link-1837');">prefix</a></tt><tt class="py-op">)</tt> </tt>
6306 <a name="L1993"></a><tt class="py-lineno">1993</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6307 <a name="L1994"></a><tt class="py-lineno">1994</tt> <tt class="py-line"> <tt class="py-string">'{http://ns.infrae.com/foo}bar'</tt><tt class="py-op">,</tt> </tt>
6308 <a name="L1995"></a><tt class="py-lineno">1995</tt> <tt class="py-line"> <tt class="py-name">e1</tt><tt class="py-op">.</tt><tt id="link-2147" class="py-name"><a title="lxml.etree._Comment.tag
6309 lxml.etree._Element.tag
6310 lxml.etree._Entity.tag
6311 lxml.etree._ProcessingInstruction.tag
6312 lxml.etree._ReadOnlyProxy.tag
6313 lxml.tests.test_xpathevaluator.tag
6314 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-2147', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
6315 <a name="L1996"></a><tt class="py-lineno">1996</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6316 <a name="L1997"></a><tt class="py-lineno">1997</tt> <tt class="py-line"> <tt class="py-string">'{http://ns.infrae.com/foo}bar'</tt><tt class="py-op">,</tt> </tt>
6317 <a name="L1998"></a><tt class="py-lineno">1998</tt> <tt class="py-line"> <tt class="py-name">e1</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-2148" class="py-name"><a title="lxml.etree._Comment.tag
6318 lxml.etree._Element.tag
6319 lxml.etree._Entity.tag
6320 lxml.etree._ProcessingInstruction.tag
6321 lxml.etree._ReadOnlyProxy.tag
6322 lxml.tests.test_xpathevaluator.tag
6323 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-2148', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
6324 </div><a name="L1999"></a><tt class="py-lineno">1999</tt> <tt class="py-line"> </tt>
6325 <a name="ETreeOnlyTestCase.test_namespaces_copy_element"></a><div id="ETreeOnlyTestCase.test_namespaces_copy_element-def"><a name="L2000"></a><tt class="py-lineno">2000</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_namespaces_copy_element-toggle" onclick="return toggle('ETreeOnlyTestCase.test_namespaces_copy_element');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespaces_copy_element">test_namespaces_copy_element</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6326 </div><div id="ETreeOnlyTestCase.test_namespaces_copy_element-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_namespaces_copy_element-expanded"><a name="L2001"></a><tt class="py-lineno">2001</tt> <tt class="py-line"> <tt id="link-2149" class="py-name"><a title="lxml.etree
6327 lxml.sax.ElementTreeContentHandler.etree
6328 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6329 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6330 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2149', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2150" class="py-name"><a title="lxml.etree
6331 lxml.sax.ElementTreeContentHandler.etree
6332 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6333 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6334 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2150', 'etree', 'link-10');">etree</a></tt> </tt>
6335 <a name="L2002"></a><tt class="py-lineno">2002</tt> <tt class="py-line"> </tt>
6336 <a name="L2003"></a><tt class="py-lineno">2003</tt> <tt class="py-line"> <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> <tt class="py-string">'http://ns.infrae.com/BAR'</tt><tt class="py-op">}</tt> </tt>
6337 <a name="L2004"></a><tt class="py-lineno">2004</tt> <tt class="py-line"> <tt class="py-name">e1</tt> <tt class="py-op">=</tt> <tt id="link-2151" class="py-name"><a title="lxml.etree
6338 lxml.sax.ElementTreeContentHandler.etree
6339 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6340 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6341 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2151', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2152" class="py-name"><a title="lxml.cssselect.Element
6344 lxml.objectify.Element
6345 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6346 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2152', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'{http://ns.infrae.com/BAR}bar'</tt><tt class="py-op">,</tt> <tt id="link-2153" class="py-name"><a title="lxml.etree._Element.nsmap" class="py-name" href="#" onclick="return doclink('link-2153', 'nsmap', 'link-191');">nsmap</a></tt><tt class="py-op">=</tt><tt class="py-name">r</tt><tt class="py-op">)</tt> </tt>
6347 <a name="L2005"></a><tt class="py-lineno">2005</tt> <tt class="py-line"> <tt class="py-name">e2</tt> <tt class="py-op">=</tt> <tt id="link-2154" class="py-name"><a title="lxml.etree
6348 lxml.sax.ElementTreeContentHandler.etree
6349 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6350 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6351 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2154', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2155" class="py-name"><a title="lxml.cssselect.Element
6354 lxml.objectify.Element
6355 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6356 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2155', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'{http://ns.infrae.com/foo}bar'</tt><tt class="py-op">,</tt> <tt id="link-2156" class="py-name"><a title="lxml.etree._Element.nsmap" class="py-name" href="#" onclick="return doclink('link-2156', 'nsmap', 'link-191');">nsmap</a></tt><tt class="py-op">=</tt><tt class="py-name">r</tt><tt class="py-op">)</tt> </tt>
6357 <a name="L2006"></a><tt class="py-lineno">2006</tt> <tt class="py-line"> </tt>
6358 <a name="L2007"></a><tt class="py-lineno">2007</tt> <tt class="py-line"> <tt class="py-name">e1</tt><tt class="py-op">.</tt><tt id="link-2157" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
6359 lxml.etree._Element.append
6360 lxml.etree._OpaqueDocumentWrapper.append
6361 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-2157', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">e2</tt><tt class="py-op">)</tt> </tt>
6362 <a name="L2008"></a><tt class="py-lineno">2008</tt> <tt class="py-line"> </tt>
6363 <a name="L2009"></a><tt class="py-lineno">2009</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6364 <a name="L2010"></a><tt class="py-lineno">2010</tt> <tt class="py-line"> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
6365 <a name="L2011"></a><tt class="py-lineno">2011</tt> <tt class="py-line"> <tt class="py-name">e1</tt><tt class="py-op">.</tt><tt id="link-2158" class="py-name"><a title="lxml.etree._Element.prefix
6366 lxml.etree._ReadOnlyElementProxy.prefix
6367 lxml.etree._XPathFunctionNamespaceRegistry.prefix" class="py-name" href="#" onclick="return doclink('link-2158', 'prefix', 'link-1837');">prefix</a></tt><tt class="py-op">)</tt> </tt>
6368 <a name="L2012"></a><tt class="py-lineno">2012</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertNotEquals</tt><tt class="py-op">(</tt> </tt>
6369 <a name="L2013"></a><tt class="py-lineno">2013</tt> <tt class="py-line"> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
6370 <a name="L2014"></a><tt class="py-lineno">2014</tt> <tt class="py-line"> <tt class="py-name">e2</tt><tt class="py-op">.</tt><tt id="link-2159" class="py-name"><a title="lxml.etree._Element.prefix
6371 lxml.etree._ReadOnlyElementProxy.prefix
6372 lxml.etree._XPathFunctionNamespaceRegistry.prefix" class="py-name" href="#" onclick="return doclink('link-2159', 'prefix', 'link-1837');">prefix</a></tt><tt class="py-op">)</tt> </tt>
6373 <a name="L2015"></a><tt class="py-lineno">2015</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6374 <a name="L2016"></a><tt class="py-lineno">2016</tt> <tt class="py-line"> <tt class="py-string">'{http://ns.infrae.com/BAR}bar'</tt><tt class="py-op">,</tt> </tt>
6375 <a name="L2017"></a><tt class="py-lineno">2017</tt> <tt class="py-line"> <tt class="py-name">e1</tt><tt class="py-op">.</tt><tt id="link-2160" class="py-name"><a title="lxml.etree._Comment.tag
6376 lxml.etree._Element.tag
6377 lxml.etree._Entity.tag
6378 lxml.etree._ProcessingInstruction.tag
6379 lxml.etree._ReadOnlyProxy.tag
6380 lxml.tests.test_xpathevaluator.tag
6381 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-2160', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
6382 <a name="L2018"></a><tt class="py-lineno">2018</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6383 <a name="L2019"></a><tt class="py-lineno">2019</tt> <tt class="py-line"> <tt class="py-string">'{http://ns.infrae.com/foo}bar'</tt><tt class="py-op">,</tt> </tt>
6384 <a name="L2020"></a><tt class="py-lineno">2020</tt> <tt class="py-line"> <tt class="py-name">e2</tt><tt class="py-op">.</tt><tt id="link-2161" class="py-name"><a title="lxml.etree._Comment.tag
6385 lxml.etree._Element.tag
6386 lxml.etree._Entity.tag
6387 lxml.etree._ProcessingInstruction.tag
6388 lxml.etree._ReadOnlyProxy.tag
6389 lxml.tests.test_xpathevaluator.tag
6390 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-2161', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
6391 </div><a name="L2021"></a><tt class="py-lineno">2021</tt> <tt class="py-line"> </tt>
6392 <a name="ETreeOnlyTestCase.test_namespaces_reuse_after_move"></a><div id="ETreeOnlyTestCase.test_namespaces_reuse_after_move-def"><a name="L2022"></a><tt class="py-lineno">2022</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_namespaces_reuse_after_move-toggle" onclick="return toggle('ETreeOnlyTestCase.test_namespaces_reuse_after_move');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespaces_reuse_after_move">test_namespaces_reuse_after_move</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6393 </div><div id="ETreeOnlyTestCase.test_namespaces_reuse_after_move-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_namespaces_reuse_after_move-expanded"><a name="L2023"></a><tt class="py-lineno">2023</tt> <tt class="py-line"> <tt class="py-name">ns_href</tt> <tt class="py-op">=</tt> <tt class="py-string">"http://a.b.c"</tt> </tt>
6394 <a name="L2024"></a><tt class="py-lineno">2024</tt> <tt class="py-line"> <tt class="py-name">one</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2162" class="py-name"><a title="lxml.etree
6395 lxml.sax.ElementTreeContentHandler.etree
6396 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6397 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6398 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2162', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2163" class="py-name"><a title="lxml.etree.fromstring
6399 lxml.html.fromstring
6400 lxml.html.html5parser.fromstring
6401 lxml.html.soupparser.fromstring
6402 lxml.objectify.fromstring" class="py-name" href="#" onclick="return doclink('link-2163', 'fromstring', 'link-737');">fromstring</a></tt><tt class="py-op">(</tt> </tt>
6403 <a name="L2025"></a><tt class="py-lineno">2025</tt> <tt class="py-line"> <tt id="link-2164" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2164', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<foo><bar xmlns:ns="%s"><ns:baz/></bar></foo>'</tt> <tt class="py-op">%</tt> <tt class="py-name">ns_href</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6404 <a name="L2026"></a><tt class="py-lineno">2026</tt> <tt class="py-line"> <tt class="py-name">baz</tt> <tt class="py-op">=</tt> <tt class="py-name">one</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
6405 <a name="L2027"></a><tt class="py-lineno">2027</tt> <tt class="py-line"> </tt>
6406 <a name="L2028"></a><tt class="py-lineno">2028</tt> <tt class="py-line"> <tt class="py-name">two</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2165" class="py-name"><a title="lxml.etree
6407 lxml.sax.ElementTreeContentHandler.etree
6408 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6409 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6410 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2165', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2166" class="py-name"><a title="lxml.etree.fromstring
6411 lxml.html.fromstring
6412 lxml.html.html5parser.fromstring
6413 lxml.html.soupparser.fromstring
6414 lxml.objectify.fromstring" class="py-name" href="#" onclick="return doclink('link-2166', 'fromstring', 'link-737');">fromstring</a></tt><tt class="py-op">(</tt> </tt>
6415 <a name="L2029"></a><tt class="py-lineno">2029</tt> <tt class="py-line"> <tt id="link-2167" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2167', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root xmlns:ns="%s"/>'</tt> <tt class="py-op">%</tt> <tt class="py-name">ns_href</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6416 <a name="L2030"></a><tt class="py-lineno">2030</tt> <tt class="py-line"> <tt class="py-name">two</tt><tt class="py-op">.</tt><tt id="link-2168" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
6417 lxml.etree._Element.append
6418 lxml.etree._OpaqueDocumentWrapper.append
6419 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-2168', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">baz</tt><tt class="py-op">)</tt> </tt>
6420 <a name="L2031"></a><tt class="py-lineno">2031</tt> <tt class="py-line"> <tt class="py-keyword">del</tt> <tt class="py-name">one</tt> <tt class="py-comment"># make sure the source document is deallocated</tt> </tt>
6421 <a name="L2032"></a><tt class="py-lineno">2032</tt> <tt class="py-line"> </tt>
6422 <a name="L2033"></a><tt class="py-lineno">2033</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-string">'{%s}baz'</tt> <tt class="py-op">%</tt> <tt class="py-name">ns_href</tt><tt class="py-op">,</tt> <tt class="py-name">baz</tt><tt class="py-op">.</tt><tt id="link-2169" class="py-name"><a title="lxml.etree._Comment.tag
6423 lxml.etree._Element.tag
6424 lxml.etree._Entity.tag
6425 lxml.etree._ProcessingInstruction.tag
6426 lxml.etree._ReadOnlyProxy.tag
6427 lxml.tests.test_xpathevaluator.tag
6428 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-2169', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
6429 <a name="L2034"></a><tt class="py-lineno">2034</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6430 <a name="L2035"></a><tt class="py-lineno">2035</tt> <tt class="py-line"> <tt id="link-2170" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2170', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<root xmlns:ns="%s"><ns:baz/></root>'</tt> <tt class="py-op">%</tt> <tt class="py-name">ns_href</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
6431 <a name="L2036"></a><tt class="py-lineno">2036</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2171" class="py-name"><a title="lxml.etree
6432 lxml.sax.ElementTreeContentHandler.etree
6433 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6434 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6435 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2171', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2172" class="py-name"><a title="lxml.etree.XSLT.tostring
6437 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2172', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">two</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6438 </div><a name="L2037"></a><tt class="py-lineno">2037</tt> <tt class="py-line"> </tt>
6439 <a name="ETreeOnlyTestCase.test_namespace_cleanup"></a><div id="ETreeOnlyTestCase.test_namespace_cleanup-def"><a name="L2038"></a><tt class="py-lineno">2038</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_namespace_cleanup-toggle" onclick="return toggle('ETreeOnlyTestCase.test_namespace_cleanup');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespace_cleanup">test_namespace_cleanup</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6440 </div><div id="ETreeOnlyTestCase.test_namespace_cleanup-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_namespace_cleanup-expanded"><a name="L2039"></a><tt class="py-lineno">2039</tt> <tt class="py-line"> <tt id="link-2173" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-2173', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-2174" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2174', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<foo xmlns="F" xmlns:x="x"><bar xmlns:ns="NS" xmlns:b="b" xmlns="B"><ns:baz/></bar></foo>'</tt><tt class="py-op">)</tt> </tt>
6441 <a name="L2040"></a><tt class="py-lineno">2040</tt> <tt class="py-line"> <tt id="link-2175" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2175', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2176" class="py-name"><a title="lxml.etree
6442 lxml.sax.ElementTreeContentHandler.etree
6443 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6444 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6445 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2176', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2177" class="py-name"><a title="lxml.etree.fromstring
6446 lxml.html.fromstring
6447 lxml.html.html5parser.fromstring
6448 lxml.html.soupparser.fromstring
6449 lxml.objectify.fromstring" class="py-name" href="#" onclick="return doclink('link-2177', 'fromstring', 'link-737');">fromstring</a></tt><tt class="py-op">(</tt><tt id="link-2178" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-2178', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt> </tt>
6450 <a name="L2041"></a><tt class="py-lineno">2041</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2179" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-2179', 'xml', 'link-256');">xml</a></tt><tt class="py-op">,</tt> </tt>
6451 <a name="L2042"></a><tt class="py-lineno">2042</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2180" class="py-name"><a title="lxml.etree
6452 lxml.sax.ElementTreeContentHandler.etree
6453 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6454 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6455 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2180', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2181" class="py-name"><a title="lxml.etree.XSLT.tostring
6457 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2181', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt id="link-2182" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2182', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6458 <a name="L2043"></a><tt class="py-lineno">2043</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2183" class="py-name"><a title="lxml.etree
6459 lxml.sax.ElementTreeContentHandler.etree
6460 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6461 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6462 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2183', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2184" class="py-name" targets="Function lxml.etree.cleanup_namespaces()=lxml.etree-module.html#cleanup_namespaces"><a title="lxml.etree.cleanup_namespaces" class="py-name" href="#" onclick="return doclink('link-2184', 'cleanup_namespaces', 'link-2184');">cleanup_namespaces</a></tt><tt class="py-op">(</tt><tt id="link-2185" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2185', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt> </tt>
6463 <a name="L2044"></a><tt class="py-lineno">2044</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6464 <a name="L2045"></a><tt class="py-lineno">2045</tt> <tt class="py-line"> <tt id="link-2186" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2186', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<foo xmlns="F"><bar xmlns:ns="NS" xmlns="B"><ns:baz/></bar></foo>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
6465 <a name="L2046"></a><tt class="py-lineno">2046</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2187" class="py-name"><a title="lxml.etree
6466 lxml.sax.ElementTreeContentHandler.etree
6467 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6468 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6469 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2187', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2188" class="py-name"><a title="lxml.etree.XSLT.tostring
6471 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2188', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt id="link-2189" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2189', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6472 </div><a name="L2047"></a><tt class="py-lineno">2047</tt> <tt class="py-line"> </tt>
6473 <a name="ETreeOnlyTestCase.test_element_nsmap"></a><div id="ETreeOnlyTestCase.test_element_nsmap-def"><a name="L2048"></a><tt class="py-lineno">2048</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_element_nsmap-toggle" onclick="return toggle('ETreeOnlyTestCase.test_element_nsmap');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_element_nsmap">test_element_nsmap</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6474 </div><div id="ETreeOnlyTestCase.test_element_nsmap-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_element_nsmap-expanded"><a name="L2049"></a><tt class="py-lineno">2049</tt> <tt class="py-line"> <tt id="link-2190" class="py-name"><a title="lxml.etree
6475 lxml.sax.ElementTreeContentHandler.etree
6476 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6477 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6478 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2190', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2191" class="py-name"><a title="lxml.etree
6479 lxml.sax.ElementTreeContentHandler.etree
6480 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6481 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6482 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2191', 'etree', 'link-10');">etree</a></tt> </tt>
6483 <a name="L2050"></a><tt class="py-lineno">2050</tt> <tt class="py-line"> </tt>
6484 <a name="L2051"></a><tt class="py-lineno">2051</tt> <tt class="py-line"> <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> <tt class="py-string">'http://ns.infrae.com/foo'</tt><tt class="py-op">,</tt> </tt>
6485 <a name="L2052"></a><tt class="py-lineno">2052</tt> <tt class="py-line"> <tt class="py-string">'hoi'</tt><tt class="py-op">:</tt> <tt class="py-string">'http://ns.infrae.com/hoi'</tt><tt class="py-op">}</tt> </tt>
6486 <a name="L2053"></a><tt class="py-lineno">2053</tt> <tt class="py-line"> <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt id="link-2192" class="py-name"><a title="lxml.etree
6487 lxml.sax.ElementTreeContentHandler.etree
6488 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6489 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6490 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2192', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2193" class="py-name"><a title="lxml.cssselect.Element
6493 lxml.objectify.Element
6494 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6495 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2193', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'{http://ns.infrae.com/foo}bar'</tt><tt class="py-op">,</tt> <tt id="link-2194" class="py-name"><a title="lxml.etree._Element.nsmap" class="py-name" href="#" onclick="return doclink('link-2194', 'nsmap', 'link-191');">nsmap</a></tt><tt class="py-op">=</tt><tt class="py-name">r</tt><tt class="py-op">)</tt> </tt>
6496 <a name="L2054"></a><tt class="py-lineno">2054</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6497 <a name="L2055"></a><tt class="py-lineno">2055</tt> <tt class="py-line"> <tt class="py-name">r</tt><tt class="py-op">,</tt> </tt>
6498 <a name="L2056"></a><tt class="py-lineno">2056</tt> <tt class="py-line"> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-2195" class="py-name"><a title="lxml.etree._Element.nsmap" class="py-name" href="#" onclick="return doclink('link-2195', 'nsmap', 'link-191');">nsmap</a></tt><tt class="py-op">)</tt> </tt>
6499 </div><a name="L2057"></a><tt class="py-lineno">2057</tt> <tt class="py-line"> </tt>
6500 <a name="ETreeOnlyTestCase.test_subelement_nsmap"></a><div id="ETreeOnlyTestCase.test_subelement_nsmap-def"><a name="L2058"></a><tt class="py-lineno">2058</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_subelement_nsmap-toggle" onclick="return toggle('ETreeOnlyTestCase.test_subelement_nsmap');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_subelement_nsmap">test_subelement_nsmap</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6501 </div><div id="ETreeOnlyTestCase.test_subelement_nsmap-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_subelement_nsmap-expanded"><a name="L2059"></a><tt class="py-lineno">2059</tt> <tt class="py-line"> <tt id="link-2196" class="py-name"><a title="lxml.etree
6502 lxml.sax.ElementTreeContentHandler.etree
6503 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6504 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6505 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2196', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2197" class="py-name"><a title="lxml.etree
6506 lxml.sax.ElementTreeContentHandler.etree
6507 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6508 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6509 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2197', 'etree', 'link-10');">etree</a></tt> </tt>
6510 <a name="L2060"></a><tt class="py-lineno">2060</tt> <tt class="py-line"> </tt>
6511 <a name="L2061"></a><tt class="py-lineno">2061</tt> <tt class="py-line"> <tt class="py-name">re</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> <tt class="py-string">'http://ns.infrae.com/foo'</tt><tt class="py-op">,</tt> </tt>
6512 <a name="L2062"></a><tt class="py-lineno">2062</tt> <tt class="py-line"> <tt class="py-string">'hoi'</tt><tt class="py-op">:</tt> <tt class="py-string">'http://ns.infrae.com/hoi'</tt><tt class="py-op">}</tt> </tt>
6513 <a name="L2063"></a><tt class="py-lineno">2063</tt> <tt class="py-line"> <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt id="link-2198" class="py-name"><a title="lxml.etree
6514 lxml.sax.ElementTreeContentHandler.etree
6515 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6516 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6517 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2198', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2199" class="py-name"><a title="lxml.cssselect.Element
6520 lxml.objectify.Element
6521 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6522 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2199', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'{http://ns.infrae.com/foo}bar'</tt><tt class="py-op">,</tt> <tt id="link-2200" class="py-name"><a title="lxml.etree._Element.nsmap" class="py-name" href="#" onclick="return doclink('link-2200', 'nsmap', 'link-191');">nsmap</a></tt><tt class="py-op">=</tt><tt class="py-name">re</tt><tt class="py-op">)</tt> </tt>
6523 <a name="L2064"></a><tt class="py-lineno">2064</tt> <tt class="py-line"> </tt>
6524 <a name="L2065"></a><tt class="py-lineno">2065</tt> <tt class="py-line"> <tt class="py-name">rs</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-name">None</tt><tt class="py-op">:</tt> <tt class="py-string">'http://ns.infrae.com/honk'</tt><tt class="py-op">,</tt> </tt>
6525 <a name="L2066"></a><tt class="py-lineno">2066</tt> <tt class="py-line"> <tt class="py-string">'top'</tt><tt class="py-op">:</tt> <tt class="py-string">'http://ns.infrae.com/top'</tt><tt class="py-op">}</tt> </tt>
6526 <a name="L2067"></a><tt class="py-lineno">2067</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt id="link-2201" class="py-name"><a title="lxml.etree
6527 lxml.sax.ElementTreeContentHandler.etree
6528 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6529 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6530 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2201', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2202" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2202', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">,</tt> <tt class="py-string">'{http://ns.infrae.com/honk}bar'</tt><tt class="py-op">,</tt> <tt id="link-2203" class="py-name"><a title="lxml.etree._Element.nsmap" class="py-name" href="#" onclick="return doclink('link-2203', 'nsmap', 'link-191');">nsmap</a></tt><tt class="py-op">=</tt><tt class="py-name">rs</tt><tt class="py-op">)</tt> </tt>
6531 <a name="L2068"></a><tt class="py-lineno">2068</tt> <tt class="py-line"> </tt>
6532 <a name="L2069"></a><tt class="py-lineno">2069</tt> <tt class="py-line"> <tt class="py-name">r</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt id="link-2204" class="py-name"><a title="lxml.etree.PyErrorLog.copy
6533 lxml.etree._BaseErrorLog.copy
6534 lxml.etree._BaseParser.copy
6535 lxml.etree._ErrorLog.copy
6536 lxml.etree._IDDict.copy
6537 lxml.etree._ListErrorLog.copy
6538 lxml.etree._ResolverRegistry.copy
6539 lxml.etree.iterparse.copy" class="py-name" href="#" onclick="return doclink('link-2204', 'copy', 'link-1');">copy</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
6540 <a name="L2070"></a><tt class="py-lineno">2070</tt> <tt class="py-line"> <tt class="py-name">r</tt><tt class="py-op">.</tt><tt id="link-2205" class="py-name" targets="Method lxml.etree._Attrib.update()=lxml.etree._Attrib-class.html#update,Method lxml.etree._NamespaceRegistry.update()=lxml.etree._NamespaceRegistry-class.html#update"><a title="lxml.etree._Attrib.update
6541 lxml.etree._NamespaceRegistry.update" class="py-name" href="#" onclick="return doclink('link-2205', 'update', 'link-2205');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">rs</tt><tt class="py-op">)</tt> </tt>
6542 <a name="L2071"></a><tt class="py-lineno">2071</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">re</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-2206" class="py-name"><a title="lxml.etree._Element.nsmap" class="py-name" href="#" onclick="return doclink('link-2206', 'nsmap', 'link-191');">nsmap</a></tt><tt class="py-op">)</tt> </tt>
6543 <a name="L2072"></a><tt class="py-lineno">2072</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">r</tt><tt class="py-op">,</tt> <tt class="py-name">s</tt><tt class="py-op">.</tt><tt id="link-2207" class="py-name"><a title="lxml.etree._Element.nsmap" class="py-name" href="#" onclick="return doclink('link-2207', 'nsmap', 'link-191');">nsmap</a></tt><tt class="py-op">)</tt> </tt>
6544 </div><a name="L2073"></a><tt class="py-lineno">2073</tt> <tt class="py-line"> </tt>
6545 <a name="ETreeOnlyTestCase.test_html_prefix_nsmap"></a><div id="ETreeOnlyTestCase.test_html_prefix_nsmap-def"><a name="L2074"></a><tt class="py-lineno">2074</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_html_prefix_nsmap-toggle" onclick="return toggle('ETreeOnlyTestCase.test_html_prefix_nsmap');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_html_prefix_nsmap">test_html_prefix_nsmap</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6546 </div><div id="ETreeOnlyTestCase.test_html_prefix_nsmap-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_html_prefix_nsmap-expanded"><a name="L2075"></a><tt class="py-lineno">2075</tt> <tt class="py-line"> <tt id="link-2208" class="py-name"><a title="lxml.etree
6547 lxml.sax.ElementTreeContentHandler.etree
6548 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6549 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6550 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2208', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2209" class="py-name"><a title="lxml.etree
6551 lxml.sax.ElementTreeContentHandler.etree
6552 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6553 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6554 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2209', 'etree', 'link-10');">etree</a></tt> </tt>
6555 <a name="L2076"></a><tt class="py-lineno">2076</tt> <tt class="py-line"> <tt class="py-name">el</tt> <tt class="py-op">=</tt> <tt id="link-2210" class="py-name"><a title="lxml.etree
6556 lxml.sax.ElementTreeContentHandler.etree
6557 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6558 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6559 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2210', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2211" class="py-name"><a title="lxml.etree.ErrorDomains.HTML
6561 lxml.html.builder.HTML" class="py-name" href="#" onclick="return doclink('link-2211', 'HTML', 'link-589');">HTML</a></tt><tt class="py-op">(</tt><tt class="py-string">'<hha:page-description>aa</hha:page-description>'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-2212" class="py-name" targets="Method lxml.etree._Element.find()=lxml.etree._Element-class.html#find,Method lxml.etree._ElementTree.find()=lxml.etree._ElementTree-class.html#find,Variable lxml.objectify.ObjectPath.find=lxml.objectify.ObjectPath-class.html#find,Method lxml.objectify.ObjectifiedElement.find()=lxml.objectify.ObjectifiedElement-class.html#find"><a title="lxml.etree._Element.find
6562 lxml.etree._ElementTree.find
6563 lxml.objectify.ObjectPath.find
6564 lxml.objectify.ObjectifiedElement.find" class="py-name" href="#" onclick="return doclink('link-2212', 'find', 'link-2212');">find</a></tt><tt class="py-op">(</tt><tt class="py-string">'.//page-description'</tt><tt class="py-op">)</tt> </tt>
6565 <a name="L2077"></a><tt class="py-lineno">2077</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">{</tt><tt class="py-string">'hha'</tt><tt class="py-op">:</tt> <tt class="py-name">None</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-2213" class="py-name"><a title="lxml.etree._Element.nsmap" class="py-name" href="#" onclick="return doclink('link-2213', 'nsmap', 'link-191');">nsmap</a></tt><tt class="py-op">)</tt> </tt>
6566 </div><a name="L2078"></a><tt class="py-lineno">2078</tt> <tt class="py-line"> </tt>
6567 <a name="ETreeOnlyTestCase.test_getiterator_filter_namespace"></a><div id="ETreeOnlyTestCase.test_getiterator_filter_namespace-def"><a name="L2079"></a><tt class="py-lineno">2079</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_getiterator_filter_namespace-toggle" onclick="return toggle('ETreeOnlyTestCase.test_getiterator_filter_namespace');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_getiterator_filter_namespace">test_getiterator_filter_namespace</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6568 </div><div id="ETreeOnlyTestCase.test_getiterator_filter_namespace-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_getiterator_filter_namespace-expanded"><a name="L2080"></a><tt class="py-lineno">2080</tt> <tt class="py-line"> <tt id="link-2214" class="py-name"><a title="lxml.cssselect.Element
6571 lxml.objectify.Element
6572 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6573 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2214', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2215" class="py-name"><a title="lxml.etree
6574 lxml.sax.ElementTreeContentHandler.etree
6575 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6576 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6577 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2215', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2216" class="py-name"><a title="lxml.cssselect.Element
6580 lxml.objectify.Element
6581 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6582 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2216', 'Element', 'link-69');">Element</a></tt> </tt>
6583 <a name="L2081"></a><tt class="py-lineno">2081</tt> <tt class="py-line"> <tt id="link-2217" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2217', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2218" class="py-name"><a title="lxml.etree
6584 lxml.sax.ElementTreeContentHandler.etree
6585 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6586 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6587 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2218', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2219" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2219', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
6588 <a name="L2082"></a><tt class="py-lineno">2082</tt> <tt class="py-line"> </tt>
6589 <a name="L2083"></a><tt class="py-lineno">2083</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-2220" class="py-name"><a title="lxml.cssselect.Element
6592 lxml.objectify.Element
6593 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6594 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2220', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'{a}a'</tt><tt class="py-op">)</tt> </tt>
6595 <a name="L2084"></a><tt class="py-lineno">2084</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-2221" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2221', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'{a}b'</tt><tt class="py-op">)</tt> </tt>
6596 <a name="L2085"></a><tt class="py-lineno">2085</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-2222" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2222', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'{a}c'</tt><tt class="py-op">)</tt> </tt>
6597 <a name="L2086"></a><tt class="py-lineno">2086</tt> <tt class="py-line"> <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt id="link-2223" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2223', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">,</tt> <tt class="py-string">'{b}d'</tt><tt class="py-op">)</tt> </tt>
6598 <a name="L2087"></a><tt class="py-lineno">2087</tt> <tt class="py-line"> <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt id="link-2224" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2224', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-string">'{a}e'</tt><tt class="py-op">)</tt> </tt>
6599 <a name="L2088"></a><tt class="py-lineno">2088</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt id="link-2225" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2225', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-string">'{b}f'</tt><tt class="py-op">)</tt> </tt>
6600 <a name="L2089"></a><tt class="py-lineno">2089</tt> <tt class="py-line"> </tt>
6601 <a name="L2090"></a><tt class="py-lineno">2090</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6602 <a name="L2091"></a><tt class="py-lineno">2091</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">a</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
6603 <a name="L2092"></a><tt class="py-lineno">2092</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-2226" class="py-name"><a title="lxml.etree._Element.getiterator
6604 lxml.etree._ElementTree.getiterator" class="py-name" href="#" onclick="return doclink('link-2226', 'getiterator', 'link-1163');">getiterator</a></tt><tt class="py-op">(</tt><tt class="py-string">'{a}a'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6605 <a name="L2093"></a><tt class="py-lineno">2093</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6606 <a name="L2094"></a><tt class="py-lineno">2094</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
6607 <a name="L2095"></a><tt class="py-lineno">2095</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-2227" class="py-name"><a title="lxml.etree._Element.getiterator
6608 lxml.etree._ElementTree.getiterator" class="py-name" href="#" onclick="return doclink('link-2227', 'getiterator', 'link-1163');">getiterator</a></tt><tt class="py-op">(</tt><tt class="py-string">'{b}a'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6609 <a name="L2096"></a><tt class="py-lineno">2096</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6610 <a name="L2097"></a><tt class="py-lineno">2097</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
6611 <a name="L2098"></a><tt class="py-lineno">2098</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-2228" class="py-name"><a title="lxml.etree._Element.getiterator
6612 lxml.etree._ElementTree.getiterator" class="py-name" href="#" onclick="return doclink('link-2228', 'getiterator', 'link-1163');">getiterator</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6613 <a name="L2099"></a><tt class="py-lineno">2099</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6614 <a name="L2100"></a><tt class="py-lineno">2100</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">f</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
6615 <a name="L2101"></a><tt class="py-lineno">2101</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-2229" class="py-name"><a title="lxml.etree._Element.getiterator
6616 lxml.etree._ElementTree.getiterator" class="py-name" href="#" onclick="return doclink('link-2229', 'getiterator', 'link-1163');">getiterator</a></tt><tt class="py-op">(</tt><tt class="py-string">'{b}*'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6617 <a name="L2102"></a><tt class="py-lineno">2102</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6618 <a name="L2103"></a><tt class="py-lineno">2103</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">d</tt><tt class="py-op">,</tt> <tt class="py-name">f</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
6619 <a name="L2104"></a><tt class="py-lineno">2104</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-2230" class="py-name"><a title="lxml.etree._Element.getiterator
6620 lxml.etree._ElementTree.getiterator" class="py-name" href="#" onclick="return doclink('link-2230', 'getiterator', 'link-1163');">getiterator</a></tt><tt class="py-op">(</tt><tt class="py-string">'{b}*'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6621 </div><a name="L2105"></a><tt class="py-lineno">2105</tt> <tt class="py-line"> </tt>
6622 <a name="ETreeOnlyTestCase.test_getiterator_filter_entities"></a><div id="ETreeOnlyTestCase.test_getiterator_filter_entities-def"><a name="L2106"></a><tt class="py-lineno">2106</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_getiterator_filter_entities-toggle" onclick="return toggle('ETreeOnlyTestCase.test_getiterator_filter_entities');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_getiterator_filter_entities">test_getiterator_filter_entities</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6623 </div><div id="ETreeOnlyTestCase.test_getiterator_filter_entities-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_getiterator_filter_entities-expanded"><a name="L2107"></a><tt class="py-lineno">2107</tt> <tt class="py-line"> <tt id="link-2231" class="py-name"><a title="lxml.cssselect.Element
6626 lxml.objectify.Element
6627 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6628 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2231', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2232" class="py-name"><a title="lxml.etree
6629 lxml.sax.ElementTreeContentHandler.etree
6630 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6631 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6632 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2232', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2233" class="py-name"><a title="lxml.cssselect.Element
6635 lxml.objectify.Element
6636 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6637 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2233', 'Element', 'link-69');">Element</a></tt> </tt>
6638 <a name="L2108"></a><tt class="py-lineno">2108</tt> <tt class="py-line"> <tt id="link-2234" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-2234', 'Entity', 'link-1343');">Entity</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2235" class="py-name"><a title="lxml.etree
6639 lxml.sax.ElementTreeContentHandler.etree
6640 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6641 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6642 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2235', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2236" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-2236', 'Entity', 'link-1343');">Entity</a></tt> </tt>
6643 <a name="L2109"></a><tt class="py-lineno">2109</tt> <tt class="py-line"> <tt id="link-2237" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2237', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2238" class="py-name"><a title="lxml.etree
6644 lxml.sax.ElementTreeContentHandler.etree
6645 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6646 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6647 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2238', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2239" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2239', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
6648 <a name="L2110"></a><tt class="py-lineno">2110</tt> <tt class="py-line"> </tt>
6649 <a name="L2111"></a><tt class="py-lineno">2111</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-2240" class="py-name"><a title="lxml.cssselect.Element
6652 lxml.objectify.Element
6653 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6654 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2240', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
6655 <a name="L2112"></a><tt class="py-lineno">2112</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-2241" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2241', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
6656 <a name="L2113"></a><tt class="py-lineno">2113</tt> <tt class="py-line"> <tt class="py-name">entity_b</tt> <tt class="py-op">=</tt> <tt id="link-2242" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-2242', 'Entity', 'link-1343');">Entity</a></tt><tt class="py-op">(</tt><tt class="py-string">"TEST-b"</tt><tt class="py-op">)</tt> </tt>
6657 <a name="L2114"></a><tt class="py-lineno">2114</tt> <tt class="py-line"> <tt class="py-name">b</tt><tt class="py-op">.</tt><tt id="link-2243" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
6658 lxml.etree._Element.append
6659 lxml.etree._OpaqueDocumentWrapper.append
6660 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-2243', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">entity_b</tt><tt class="py-op">)</tt> </tt>
6661 <a name="L2115"></a><tt class="py-lineno">2115</tt> <tt class="py-line"> </tt>
6662 <a name="L2116"></a><tt class="py-lineno">2116</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6663 <a name="L2117"></a><tt class="py-lineno">2117</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">entity_b</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
6664 <a name="L2118"></a><tt class="py-lineno">2118</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-2244" class="py-name"><a title="lxml.etree._Element.getiterator
6665 lxml.etree._ElementTree.getiterator" class="py-name" href="#" onclick="return doclink('link-2244', 'getiterator', 'link-1163');">getiterator</a></tt><tt class="py-op">(</tt><tt id="link-2245" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-2245', 'Entity', 'link-1343');">Entity</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6666 <a name="L2119"></a><tt class="py-lineno">2119</tt> <tt class="py-line"> </tt>
6667 <a name="L2120"></a><tt class="py-lineno">2120</tt> <tt class="py-line"> <tt class="py-name">entity_a</tt> <tt class="py-op">=</tt> <tt id="link-2246" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-2246', 'Entity', 'link-1343');">Entity</a></tt><tt class="py-op">(</tt><tt class="py-string">"TEST-a"</tt><tt class="py-op">)</tt> </tt>
6668 <a name="L2121"></a><tt class="py-lineno">2121</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-2247" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
6669 lxml.etree._Element.append
6670 lxml.etree._OpaqueDocumentWrapper.append
6671 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-2247', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">entity_a</tt><tt class="py-op">)</tt> </tt>
6672 <a name="L2122"></a><tt class="py-lineno">2122</tt> <tt class="py-line"> </tt>
6673 <a name="L2123"></a><tt class="py-lineno">2123</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6674 <a name="L2124"></a><tt class="py-lineno">2124</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">entity_b</tt><tt class="py-op">,</tt> <tt class="py-name">entity_a</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
6675 <a name="L2125"></a><tt class="py-lineno">2125</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-2248" class="py-name"><a title="lxml.etree._Element.getiterator
6676 lxml.etree._ElementTree.getiterator" class="py-name" href="#" onclick="return doclink('link-2248', 'getiterator', 'link-1163');">getiterator</a></tt><tt class="py-op">(</tt><tt id="link-2249" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-2249', 'Entity', 'link-1343');">Entity</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6677 <a name="L2126"></a><tt class="py-lineno">2126</tt> <tt class="py-line"> </tt>
6678 <a name="L2127"></a><tt class="py-lineno">2127</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6679 <a name="L2128"></a><tt class="py-lineno">2128</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">entity_b</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
6680 <a name="L2129"></a><tt class="py-lineno">2129</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">.</tt><tt id="link-2250" class="py-name"><a title="lxml.etree._Element.getiterator
6681 lxml.etree._ElementTree.getiterator" class="py-name" href="#" onclick="return doclink('link-2250', 'getiterator', 'link-1163');">getiterator</a></tt><tt class="py-op">(</tt><tt id="link-2251" class="py-name"><a title="lxml.etree.Entity" class="py-name" href="#" onclick="return doclink('link-2251', 'Entity', 'link-1343');">Entity</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6682 </div><a name="L2130"></a><tt class="py-lineno">2130</tt> <tt class="py-line"> </tt>
6683 <a name="ETreeOnlyTestCase.test_getiterator_filter_element"></a><div id="ETreeOnlyTestCase.test_getiterator_filter_element-def"><a name="L2131"></a><tt class="py-lineno">2131</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_getiterator_filter_element-toggle" onclick="return toggle('ETreeOnlyTestCase.test_getiterator_filter_element');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_getiterator_filter_element">test_getiterator_filter_element</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6684 </div><div id="ETreeOnlyTestCase.test_getiterator_filter_element-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_getiterator_filter_element-expanded"><a name="L2132"></a><tt class="py-lineno">2132</tt> <tt class="py-line"> <tt id="link-2252" class="py-name"><a title="lxml.cssselect.Element
6687 lxml.objectify.Element
6688 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6689 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2252', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2253" class="py-name"><a title="lxml.etree
6690 lxml.sax.ElementTreeContentHandler.etree
6691 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6692 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6693 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2253', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2254" class="py-name"><a title="lxml.cssselect.Element
6696 lxml.objectify.Element
6697 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6698 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2254', 'Element', 'link-69');">Element</a></tt> </tt>
6699 <a name="L2133"></a><tt class="py-lineno">2133</tt> <tt class="py-line"> <tt id="link-2255" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-2255', 'Comment', 'link-418');">Comment</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2256" class="py-name"><a title="lxml.etree
6700 lxml.sax.ElementTreeContentHandler.etree
6701 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6702 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6703 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2256', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2257" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-2257', 'Comment', 'link-418');">Comment</a></tt> </tt>
6704 <a name="L2134"></a><tt class="py-lineno">2134</tt> <tt class="py-line"> <tt id="link-2258" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-2258', 'PI', 'link-416');">PI</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2259" class="py-name"><a title="lxml.etree
6705 lxml.sax.ElementTreeContentHandler.etree
6706 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6707 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6708 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2259', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2260" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-2260', 'PI', 'link-416');">PI</a></tt> </tt>
6709 <a name="L2135"></a><tt class="py-lineno">2135</tt> <tt class="py-line"> <tt id="link-2261" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2261', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2262" class="py-name"><a title="lxml.etree
6710 lxml.sax.ElementTreeContentHandler.etree
6711 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6712 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6713 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2262', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2263" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2263', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
6714 <a name="L2136"></a><tt class="py-lineno">2136</tt> <tt class="py-line"> </tt>
6715 <a name="L2137"></a><tt class="py-lineno">2137</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-2264" class="py-name"><a title="lxml.cssselect.Element
6718 lxml.objectify.Element
6719 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6720 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2264', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
6721 <a name="L2138"></a><tt class="py-lineno">2138</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-2265" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2265', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
6722 <a name="L2139"></a><tt class="py-lineno">2139</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-2266" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
6723 lxml.etree._Element.append
6724 lxml.etree._OpaqueDocumentWrapper.append
6725 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-2266', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt id="link-2267" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-2267', 'Comment', 'link-418');">Comment</a></tt><tt class="py-op">(</tt><tt class="py-string">"test"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6726 <a name="L2140"></a><tt class="py-lineno">2140</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-2268" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
6727 lxml.etree._Element.append
6728 lxml.etree._OpaqueDocumentWrapper.append
6729 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-2268', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt id="link-2269" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-2269', 'PI', 'link-416');">PI</a></tt><tt class="py-op">(</tt><tt class="py-string">"pi"</tt><tt class="py-op">,</tt> <tt class="py-string">"content"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6730 <a name="L2141"></a><tt class="py-lineno">2141</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-2270" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2270', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
6731 <a name="L2142"></a><tt class="py-lineno">2142</tt> <tt class="py-line"> </tt>
6732 <a name="L2143"></a><tt class="py-lineno">2143</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6733 <a name="L2144"></a><tt class="py-lineno">2144</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-name">b</tt><tt class="py-op">,</tt> <tt class="py-name">c</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
6734 <a name="L2145"></a><tt class="py-lineno">2145</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-2271" class="py-name"><a title="lxml.etree._Element.getiterator
6735 lxml.etree._ElementTree.getiterator" class="py-name" href="#" onclick="return doclink('link-2271', 'getiterator', 'link-1163');">getiterator</a></tt><tt class="py-op">(</tt><tt id="link-2272" class="py-name"><a title="lxml.cssselect.Element
6738 lxml.objectify.Element
6739 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6740 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2272', 'Element', 'link-69');">Element</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6741 </div><a name="L2146"></a><tt class="py-lineno">2146</tt> <tt class="py-line"> </tt>
6742 <a name="ETreeOnlyTestCase.test_getiterator_filter_all_comment_pi"></a><div id="ETreeOnlyTestCase.test_getiterator_filter_all_comment_pi-def"><a name="L2147"></a><tt class="py-lineno">2147</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_getiterator_filter_all_comment_pi-toggle" onclick="return toggle('ETreeOnlyTestCase.test_getiterator_filter_all_comment_pi');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_getiterator_filter_all_comment_pi">test_getiterator_filter_all_comment_pi</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6743 </div><div id="ETreeOnlyTestCase.test_getiterator_filter_all_comment_pi-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_getiterator_filter_all_comment_pi-expanded"><a name="L2148"></a><tt class="py-lineno">2148</tt> <tt class="py-line"> <tt class="py-comment"># ElementTree iterates over everything here</tt> </tt>
6744 <a name="L2149"></a><tt class="py-lineno">2149</tt> <tt class="py-line"> <tt id="link-2273" class="py-name"><a title="lxml.cssselect.Element
6747 lxml.objectify.Element
6748 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6749 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2273', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2274" class="py-name"><a title="lxml.etree
6750 lxml.sax.ElementTreeContentHandler.etree
6751 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6752 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6753 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2274', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2275" class="py-name"><a title="lxml.cssselect.Element
6756 lxml.objectify.Element
6757 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6758 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2275', 'Element', 'link-69');">Element</a></tt> </tt>
6759 <a name="L2150"></a><tt class="py-lineno">2150</tt> <tt class="py-line"> <tt id="link-2276" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-2276', 'Comment', 'link-418');">Comment</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2277" class="py-name"><a title="lxml.etree
6760 lxml.sax.ElementTreeContentHandler.etree
6761 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6762 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6763 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2277', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2278" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-2278', 'Comment', 'link-418');">Comment</a></tt> </tt>
6764 <a name="L2151"></a><tt class="py-lineno">2151</tt> <tt class="py-line"> <tt id="link-2279" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-2279', 'PI', 'link-416');">PI</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2280" class="py-name"><a title="lxml.etree
6765 lxml.sax.ElementTreeContentHandler.etree
6766 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6767 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6768 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2280', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2281" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-2281', 'PI', 'link-416');">PI</a></tt> </tt>
6769 <a name="L2152"></a><tt class="py-lineno">2152</tt> <tt class="py-line"> <tt id="link-2282" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2282', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2283" class="py-name"><a title="lxml.etree
6770 lxml.sax.ElementTreeContentHandler.etree
6771 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6772 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6773 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2283', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2284" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2284', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
6774 <a name="L2153"></a><tt class="py-lineno">2153</tt> <tt class="py-line"> </tt>
6775 <a name="L2154"></a><tt class="py-lineno">2154</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-2285" class="py-name"><a title="lxml.cssselect.Element
6778 lxml.objectify.Element
6779 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6780 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2285', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
6781 <a name="L2155"></a><tt class="py-lineno">2155</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-2286" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2286', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
6782 <a name="L2156"></a><tt class="py-lineno">2156</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-2287" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
6783 lxml.etree._Element.append
6784 lxml.etree._OpaqueDocumentWrapper.append
6785 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-2287', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt id="link-2288" class="py-name"><a title="lxml.etree.Comment" class="py-name" href="#" onclick="return doclink('link-2288', 'Comment', 'link-418');">Comment</a></tt><tt class="py-op">(</tt><tt class="py-string">"test"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6786 <a name="L2157"></a><tt class="py-lineno">2157</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-2289" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
6787 lxml.etree._Element.append
6788 lxml.etree._OpaqueDocumentWrapper.append
6789 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-2289', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt id="link-2290" class="py-name"><a title="lxml.etree.PI" class="py-name" href="#" onclick="return doclink('link-2290', 'PI', 'link-416');">PI</a></tt><tt class="py-op">(</tt><tt class="py-string">"pi"</tt><tt class="py-op">,</tt> <tt class="py-string">"content"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6790 <a name="L2158"></a><tt class="py-lineno">2158</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-2291" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2291', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
6791 <a name="L2159"></a><tt class="py-lineno">2159</tt> <tt class="py-line"> </tt>
6792 <a name="L2160"></a><tt class="py-lineno">2160</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6793 <a name="L2161"></a><tt class="py-lineno">2161</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-name">b</tt><tt class="py-op">,</tt> <tt class="py-name">c</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
6794 <a name="L2162"></a><tt class="py-lineno">2162</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-2292" class="py-name"><a title="lxml.etree._Element.getiterator
6795 lxml.etree._ElementTree.getiterator" class="py-name" href="#" onclick="return doclink('link-2292', 'getiterator', 'link-1163');">getiterator</a></tt><tt class="py-op">(</tt><tt class="py-string">'*'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6796 </div><a name="L2163"></a><tt class="py-lineno">2163</tt> <tt class="py-line"> </tt>
6797 <a name="ETreeOnlyTestCase.test_elementtree_find_qname"></a><div id="ETreeOnlyTestCase.test_elementtree_find_qname-def"><a name="L2164"></a><tt class="py-lineno">2164</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_elementtree_find_qname-toggle" onclick="return toggle('ETreeOnlyTestCase.test_elementtree_find_qname');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_elementtree_find_qname">test_elementtree_find_qname</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6798 </div><div id="ETreeOnlyTestCase.test_elementtree_find_qname-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_elementtree_find_qname-expanded"><a name="L2165"></a><tt class="py-lineno">2165</tt> <tt class="py-line"> <tt id="link-2293" class="py-name"><a title="lxml.etree.XML
6800 lxml.tests.test_objectify.ObjectifyTestCase.XML
6801 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2293', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2294" class="py-name"><a title="lxml.etree
6802 lxml.sax.ElementTreeContentHandler.etree
6803 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6804 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6805 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2294', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2295" class="py-name"><a title="lxml.etree.XML
6807 lxml.tests.test_objectify.ObjectifyTestCase.XML
6808 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2295', 'XML', 'link-217');">XML</a></tt> </tt>
6809 <a name="L2166"></a><tt class="py-lineno">2166</tt> <tt class="py-line"> <tt id="link-2296" class="py-name"><a title="lxml.etree.ElementTree
6810 xml.etree.ElementTree
6811 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-2296', 'ElementTree', 'link-468');">ElementTree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2297" class="py-name"><a title="lxml.etree
6812 lxml.sax.ElementTreeContentHandler.etree
6813 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6814 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6815 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2297', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2298" class="py-name"><a title="lxml.etree.ElementTree
6816 xml.etree.ElementTree
6817 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-2298', 'ElementTree', 'link-468');">ElementTree</a></tt> </tt>
6818 <a name="L2167"></a><tt class="py-lineno">2167</tt> <tt class="py-line"> <tt id="link-2299" class="py-name"><a title="lxml.etree.QName
6819 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-2299', 'QName', 'link-157');">QName</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2300" class="py-name"><a title="lxml.etree
6820 lxml.sax.ElementTreeContentHandler.etree
6821 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6822 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6823 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2300', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2301" class="py-name"><a title="lxml.etree.QName
6824 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-2301', 'QName', 'link-157');">QName</a></tt> </tt>
6825 <a name="L2168"></a><tt class="py-lineno">2168</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-2302" class="py-name"><a title="lxml.etree.ElementTree
6826 xml.etree.ElementTree
6827 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-2302', 'ElementTree', 'link-468');">ElementTree</a></tt><tt class="py-op">(</tt><tt id="link-2303" class="py-name"><a title="lxml.etree.XML
6829 lxml.tests.test_objectify.ObjectifyTestCase.XML
6830 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2303', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-2304" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2304', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b><c/></b><b/><c><b/></c></a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6831 <a name="L2169"></a><tt class="py-lineno">2169</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-2305" class="py-name"><a title="lxml.etree._Element.find
6832 lxml.etree._ElementTree.find
6833 lxml.objectify.ObjectPath.find
6834 lxml.objectify.ObjectifiedElement.find" class="py-name" href="#" onclick="return doclink('link-2305', 'find', 'link-2212');">find</a></tt><tt class="py-op">(</tt><tt id="link-2306" class="py-name"><a title="lxml.etree.QName
6835 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-2306', 'QName', 'link-157');">QName</a></tt><tt class="py-op">(</tt><tt class="py-string">"c"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-2307" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-2307', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
6836 </div><a name="L2170"></a><tt class="py-lineno">2170</tt> <tt class="py-line"> </tt>
6837 <a name="ETreeOnlyTestCase.test_elementtree_findall_qname"></a><div id="ETreeOnlyTestCase.test_elementtree_findall_qname-def"><a name="L2171"></a><tt class="py-lineno">2171</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_elementtree_findall_qname-toggle" onclick="return toggle('ETreeOnlyTestCase.test_elementtree_findall_qname');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_elementtree_findall_qname">test_elementtree_findall_qname</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6838 </div><div id="ETreeOnlyTestCase.test_elementtree_findall_qname-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_elementtree_findall_qname-expanded"><a name="L2172"></a><tt class="py-lineno">2172</tt> <tt class="py-line"> <tt id="link-2308" class="py-name"><a title="lxml.etree.XML
6840 lxml.tests.test_objectify.ObjectifyTestCase.XML
6841 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2308', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2309" class="py-name"><a title="lxml.etree
6842 lxml.sax.ElementTreeContentHandler.etree
6843 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6844 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6845 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2309', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2310" class="py-name"><a title="lxml.etree.XML
6847 lxml.tests.test_objectify.ObjectifyTestCase.XML
6848 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2310', 'XML', 'link-217');">XML</a></tt> </tt>
6849 <a name="L2173"></a><tt class="py-lineno">2173</tt> <tt class="py-line"> <tt id="link-2311" class="py-name"><a title="lxml.etree.ElementTree
6850 xml.etree.ElementTree
6851 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-2311', 'ElementTree', 'link-468');">ElementTree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2312" class="py-name"><a title="lxml.etree
6852 lxml.sax.ElementTreeContentHandler.etree
6853 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6854 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6855 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2312', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2313" class="py-name"><a title="lxml.etree.ElementTree
6856 xml.etree.ElementTree
6857 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-2313', 'ElementTree', 'link-468');">ElementTree</a></tt> </tt>
6858 <a name="L2174"></a><tt class="py-lineno">2174</tt> <tt class="py-line"> <tt id="link-2314" class="py-name"><a title="lxml.etree.QName
6859 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-2314', 'QName', 'link-157');">QName</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2315" class="py-name"><a title="lxml.etree
6860 lxml.sax.ElementTreeContentHandler.etree
6861 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6862 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6863 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2315', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2316" class="py-name"><a title="lxml.etree.QName
6864 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-2316', 'QName', 'link-157');">QName</a></tt> </tt>
6865 <a name="L2175"></a><tt class="py-lineno">2175</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-2317" class="py-name"><a title="lxml.etree.ElementTree
6866 xml.etree.ElementTree
6867 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-2317', 'ElementTree', 'link-468');">ElementTree</a></tt><tt class="py-op">(</tt><tt id="link-2318" class="py-name"><a title="lxml.etree.XML
6869 lxml.tests.test_objectify.ObjectifyTestCase.XML
6870 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2318', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-2319" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2319', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b><c/></b><b/><c><b/></c></a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6871 <a name="L2176"></a><tt class="py-lineno">2176</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-2320" class="py-name" targets="Method lxml.etree._Element.findall()=lxml.etree._Element-class.html#findall,Method lxml.etree._ElementTree.findall()=lxml.etree._ElementTree-class.html#findall,Method lxml.objectify.ObjectifiedElement.findall()=lxml.objectify.ObjectifiedElement-class.html#findall"><a title="lxml.etree._Element.findall
6872 lxml.etree._ElementTree.findall
6873 lxml.objectify.ObjectifiedElement.findall" class="py-name" href="#" onclick="return doclink('link-2320', 'findall', 'link-2320');">findall</a></tt><tt class="py-op">(</tt><tt id="link-2321" class="py-name"><a title="lxml.etree.QName
6874 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-2321', 'QName', 'link-157');">QName</a></tt><tt class="py-op">(</tt><tt class="py-string">"c"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
6875 </div><a name="L2177"></a><tt class="py-lineno">2177</tt> <tt class="py-line"> </tt>
6876 <a name="ETreeOnlyTestCase.test_elementtree_findall_ns_qname"></a><div id="ETreeOnlyTestCase.test_elementtree_findall_ns_qname-def"><a name="L2178"></a><tt class="py-lineno">2178</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_elementtree_findall_ns_qname-toggle" onclick="return toggle('ETreeOnlyTestCase.test_elementtree_findall_ns_qname');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_elementtree_findall_ns_qname">test_elementtree_findall_ns_qname</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6877 </div><div id="ETreeOnlyTestCase.test_elementtree_findall_ns_qname-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_elementtree_findall_ns_qname-expanded"><a name="L2179"></a><tt class="py-lineno">2179</tt> <tt class="py-line"> <tt id="link-2322" class="py-name"><a title="lxml.etree.XML
6879 lxml.tests.test_objectify.ObjectifyTestCase.XML
6880 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2322', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2323" class="py-name"><a title="lxml.etree
6881 lxml.sax.ElementTreeContentHandler.etree
6882 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6883 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6884 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2323', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2324" class="py-name"><a title="lxml.etree.XML
6886 lxml.tests.test_objectify.ObjectifyTestCase.XML
6887 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2324', 'XML', 'link-217');">XML</a></tt> </tt>
6888 <a name="L2180"></a><tt class="py-lineno">2180</tt> <tt class="py-line"> <tt id="link-2325" class="py-name"><a title="lxml.etree.ElementTree
6889 xml.etree.ElementTree
6890 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-2325', 'ElementTree', 'link-468');">ElementTree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2326" class="py-name"><a title="lxml.etree
6891 lxml.sax.ElementTreeContentHandler.etree
6892 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6893 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6894 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2326', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2327" class="py-name"><a title="lxml.etree.ElementTree
6895 xml.etree.ElementTree
6896 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-2327', 'ElementTree', 'link-468');">ElementTree</a></tt> </tt>
6897 <a name="L2181"></a><tt class="py-lineno">2181</tt> <tt class="py-line"> <tt id="link-2328" class="py-name"><a title="lxml.etree.QName
6898 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-2328', 'QName', 'link-157');">QName</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2329" class="py-name"><a title="lxml.etree
6899 lxml.sax.ElementTreeContentHandler.etree
6900 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6901 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6902 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2329', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2330" class="py-name"><a title="lxml.etree.QName
6903 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-2330', 'QName', 'link-157');">QName</a></tt> </tt>
6904 <a name="L2182"></a><tt class="py-lineno">2182</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-2331" class="py-name"><a title="lxml.etree.ElementTree
6905 xml.etree.ElementTree
6906 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-2331', 'ElementTree', 'link-468');">ElementTree</a></tt><tt class="py-op">(</tt><tt id="link-2332" class="py-name"><a title="lxml.etree.XML
6908 lxml.tests.test_objectify.ObjectifyTestCase.XML
6909 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2332', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt> </tt>
6910 <a name="L2183"></a><tt class="py-lineno">2183</tt> <tt class="py-line"> <tt id="link-2333" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2333', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a xmlns:x="X" xmlns:y="Y"><x:b><c/></x:b><b/><c><x:b/><b/></c><b/></a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6911 <a name="L2184"></a><tt class="py-lineno">2184</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-2334" class="py-name"><a title="lxml.etree._Element.findall
6912 lxml.etree._ElementTree.findall
6913 lxml.objectify.ObjectifiedElement.findall" class="py-name" href="#" onclick="return doclink('link-2334', 'findall', 'link-2320');">findall</a></tt><tt class="py-op">(</tt><tt id="link-2335" class="py-name"><a title="lxml.etree.QName
6914 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-2335', 'QName', 'link-157');">QName</a></tt><tt class="py-op">(</tt><tt class="py-string">"b"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
6915 <a name="L2185"></a><tt class="py-lineno">2185</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-2336" class="py-name"><a title="lxml.etree._Element.findall
6916 lxml.etree._ElementTree.findall
6917 lxml.objectify.ObjectifiedElement.findall" class="py-name" href="#" onclick="return doclink('link-2336', 'findall', 'link-2320');">findall</a></tt><tt class="py-op">(</tt><tt id="link-2337" class="py-name"><a title="lxml.etree.QName
6918 xml.etree.ElementTree.QName" class="py-name" href="#" onclick="return doclink('link-2337', 'QName', 'link-157');">QName</a></tt><tt class="py-op">(</tt><tt class="py-string">"X"</tt><tt class="py-op">,</tt> <tt class="py-string">"b"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
6919 </div><a name="L2186"></a><tt class="py-lineno">2186</tt> <tt class="py-line"> </tt>
6920 <a name="ETreeOnlyTestCase.test_findall_ns"></a><div id="ETreeOnlyTestCase.test_findall_ns-def"><a name="L2187"></a><tt class="py-lineno">2187</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_findall_ns-toggle" onclick="return toggle('ETreeOnlyTestCase.test_findall_ns');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_findall_ns">test_findall_ns</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6921 </div><div id="ETreeOnlyTestCase.test_findall_ns-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_findall_ns-expanded"><a name="L2188"></a><tt class="py-lineno">2188</tt> <tt class="py-line"> <tt id="link-2338" class="py-name"><a title="lxml.etree.XML
6923 lxml.tests.test_objectify.ObjectifyTestCase.XML
6924 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2338', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2339" class="py-name"><a title="lxml.etree
6925 lxml.sax.ElementTreeContentHandler.etree
6926 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6927 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6928 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2339', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2340" class="py-name"><a title="lxml.etree.XML
6930 lxml.tests.test_objectify.ObjectifyTestCase.XML
6931 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2340', 'XML', 'link-217');">XML</a></tt> </tt>
6932 <a name="L2189"></a><tt class="py-lineno">2189</tt> <tt class="py-line"> <tt id="link-2341" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2341', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-2342" class="py-name"><a title="lxml.etree.XML
6934 lxml.tests.test_objectify.ObjectifyTestCase.XML
6935 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2342', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-2343" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2343', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a xmlns:x="X" xmlns:y="Y"><x:b><c/></x:b><b/><c><x:b/><b/></c><b/></a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6936 <a name="L2190"></a><tt class="py-lineno">2190</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt id="link-2344" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2344', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-2345" class="py-name"><a title="lxml.etree._Element.findall
6937 lxml.etree._ElementTree.findall
6938 lxml.objectify.ObjectifiedElement.findall" class="py-name" href="#" onclick="return doclink('link-2345', 'findall', 'link-2320');">findall</a></tt><tt class="py-op">(</tt><tt class="py-string">".//{X}b"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
6939 <a name="L2191"></a><tt class="py-lineno">2191</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt id="link-2346" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2346', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-2347" class="py-name"><a title="lxml.etree._Element.findall
6940 lxml.etree._ElementTree.findall
6941 lxml.objectify.ObjectifiedElement.findall" class="py-name" href="#" onclick="return doclink('link-2347', 'findall', 'link-2320');">findall</a></tt><tt class="py-op">(</tt><tt class="py-string">".//{X}*"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
6942 <a name="L2192"></a><tt class="py-lineno">2192</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt id="link-2348" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2348', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-2349" class="py-name"><a title="lxml.etree._Element.findall
6943 lxml.etree._ElementTree.findall
6944 lxml.objectify.ObjectifiedElement.findall" class="py-name" href="#" onclick="return doclink('link-2349', 'findall', 'link-2320');">findall</a></tt><tt class="py-op">(</tt><tt class="py-string">".//b"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-number">3</tt><tt class="py-op">)</tt> </tt>
6945 </div><a name="L2193"></a><tt class="py-lineno">2193</tt> <tt class="py-line"> </tt>
6946 <a name="ETreeOnlyTestCase.test_index"></a><div id="ETreeOnlyTestCase.test_index-def"><a name="L2194"></a><tt class="py-lineno">2194</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_index-toggle" onclick="return toggle('ETreeOnlyTestCase.test_index');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_index">test_index</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6947 </div><div id="ETreeOnlyTestCase.test_index-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_index-expanded"><a name="L2195"></a><tt class="py-lineno">2195</tt> <tt class="py-line"> <tt id="link-2350" class="py-name"><a title="lxml.etree
6948 lxml.sax.ElementTreeContentHandler.etree
6949 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6950 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6951 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2350', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2351" class="py-name"><a title="lxml.etree
6952 lxml.sax.ElementTreeContentHandler.etree
6953 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6954 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6955 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2351', 'etree', 'link-10');">etree</a></tt> </tt>
6956 <a name="L2196"></a><tt class="py-lineno">2196</tt> <tt class="py-line"> <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt id="link-2352" class="py-name"><a title="lxml.etree
6957 lxml.sax.ElementTreeContentHandler.etree
6958 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6959 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6960 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2352', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2353" class="py-name"><a title="lxml.cssselect.Element
6963 lxml.objectify.Element
6964 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
6965 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2353', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'foo'</tt><tt class="py-op">)</tt> </tt>
6966 <a name="L2197"></a><tt class="py-lineno">2197</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-number">10</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6967 <a name="L2198"></a><tt class="py-lineno">2198</tt> <tt class="py-line"> <tt id="link-2354" class="py-name"><a title="lxml.etree
6968 lxml.sax.ElementTreeContentHandler.etree
6969 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6970 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6971 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2354', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2355" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2355', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">,</tt> <tt class="py-string">'a%s'</tt> <tt class="py-op">%</tt> <tt class="py-name">i</tt><tt class="py-op">)</tt> </tt>
6972 <a name="L2199"></a><tt class="py-lineno">2199</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-number">10</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6973 <a name="L2200"></a><tt class="py-lineno">2200</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6974 <a name="L2201"></a><tt class="py-lineno">2201</tt> <tt class="py-line"> <tt class="py-name">i</tt><tt class="py-op">,</tt> </tt>
6975 <a name="L2202"></a><tt class="py-lineno">2202</tt> <tt class="py-line"> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-2356" class="py-name" targets="Method lxml.etree._Element.index()=lxml.etree._Element-class.html#index"><a title="lxml.etree._Element.index" class="py-name" href="#" onclick="return doclink('link-2356', 'index', 'link-2356');">index</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6976 <a name="L2203"></a><tt class="py-lineno">2203</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6977 <a name="L2204"></a><tt class="py-lineno">2204</tt> <tt class="py-line"> <tt class="py-number">3</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-2357" class="py-name"><a title="lxml.etree._Element.index" class="py-name" href="#" onclick="return doclink('link-2357', 'index', 'link-2356');">index</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-number">3</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6978 <a name="L2205"></a><tt class="py-lineno">2205</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt> </tt>
6979 <a name="L2206"></a><tt class="py-lineno">2206</tt> <tt class="py-line"> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-2358" class="py-name"><a title="lxml.etree._Element.index" class="py-name" href="#" onclick="return doclink('link-2358', 'index', 'link-2356');">index</a></tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-number">4</tt><tt class="py-op">)</tt> </tt>
6980 <a name="L2207"></a><tt class="py-lineno">2207</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt> </tt>
6981 <a name="L2208"></a><tt class="py-lineno">2208</tt> <tt class="py-line"> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-2359" class="py-name"><a title="lxml.etree._Element.index" class="py-name" href="#" onclick="return doclink('link-2359', 'index', 'link-2356');">index</a></tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
6982 <a name="L2209"></a><tt class="py-lineno">2209</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt> </tt>
6983 <a name="L2210"></a><tt class="py-lineno">2210</tt> <tt class="py-line"> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-2360" class="py-name"><a title="lxml.etree._Element.index" class="py-name" href="#" onclick="return doclink('link-2360', 'index', 'link-2356');">index</a></tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">8</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-op">-</tt><tt class="py-number">3</tt><tt class="py-op">)</tt> </tt>
6984 <a name="L2211"></a><tt class="py-lineno">2211</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt> </tt>
6985 <a name="L2212"></a><tt class="py-lineno">2212</tt> <tt class="py-line"> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-2361" class="py-name"><a title="lxml.etree._Element.index" class="py-name" href="#" onclick="return doclink('link-2361', 'index', 'link-2356');">index</a></tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">8</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-op">-</tt><tt class="py-number">5</tt><tt class="py-op">,</tt> <tt class="py-op">-</tt><tt class="py-number">3</tt><tt class="py-op">)</tt> </tt>
6986 <a name="L2213"></a><tt class="py-lineno">2213</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6987 <a name="L2214"></a><tt class="py-lineno">2214</tt> <tt class="py-line"> <tt class="py-number">8</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-2362" class="py-name"><a title="lxml.etree._Element.index" class="py-name" href="#" onclick="return doclink('link-2362', 'index', 'link-2356');">index</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">8</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6988 <a name="L2215"></a><tt class="py-lineno">2215</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6989 <a name="L2216"></a><tt class="py-lineno">2216</tt> <tt class="py-line"> <tt class="py-number">8</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-2363" class="py-name"><a title="lxml.etree._Element.index" class="py-name" href="#" onclick="return doclink('link-2363', 'index', 'link-2356');">index</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">8</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-op">-</tt><tt class="py-number">12</tt><tt class="py-op">,</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6990 <a name="L2217"></a><tt class="py-lineno">2217</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
6991 <a name="L2218"></a><tt class="py-lineno">2218</tt> <tt class="py-line"> <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-2364" class="py-name"><a title="lxml.etree._Element.index" class="py-name" href="#" onclick="return doclink('link-2364', 'index', 'link-2356');">index</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-op">-</tt><tt class="py-number">12</tt><tt class="py-op">,</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
6992 </div><a name="L2219"></a><tt class="py-lineno">2219</tt> <tt class="py-line"> </tt>
6993 <a name="ETreeOnlyTestCase.test_replace"></a><div id="ETreeOnlyTestCase.test_replace-def"><a name="L2220"></a><tt class="py-lineno">2220</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_replace-toggle" onclick="return toggle('ETreeOnlyTestCase.test_replace');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_replace">test_replace</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
6994 </div><div id="ETreeOnlyTestCase.test_replace-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_replace-expanded"><a name="L2221"></a><tt class="py-lineno">2221</tt> <tt class="py-line"> <tt id="link-2365" class="py-name"><a title="lxml.etree
6995 lxml.sax.ElementTreeContentHandler.etree
6996 lxml.tests.test_elementtree.CElementTreeTestCase.etree
6997 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
6998 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2365', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2366" class="py-name"><a title="lxml.etree
6999 lxml.sax.ElementTreeContentHandler.etree
7000 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7001 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7002 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2366', 'etree', 'link-10');">etree</a></tt> </tt>
7003 <a name="L2222"></a><tt class="py-lineno">2222</tt> <tt class="py-line"> <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt id="link-2367" class="py-name"><a title="lxml.etree
7004 lxml.sax.ElementTreeContentHandler.etree
7005 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7006 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7007 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2367', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2368" class="py-name"><a title="lxml.cssselect.Element
7010 lxml.objectify.Element
7011 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7012 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2368', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'foo'</tt><tt class="py-op">)</tt> </tt>
7013 <a name="L2223"></a><tt class="py-lineno">2223</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-number">10</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7014 <a name="L2224"></a><tt class="py-lineno">2224</tt> <tt class="py-line"> <tt class="py-name">el</tt> <tt class="py-op">=</tt> <tt id="link-2369" class="py-name"><a title="lxml.etree
7015 lxml.sax.ElementTreeContentHandler.etree
7016 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7017 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7018 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2369', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2370" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2370', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">,</tt> <tt class="py-string">'a%s'</tt> <tt class="py-op">%</tt> <tt class="py-name">i</tt><tt class="py-op">)</tt> </tt>
7019 <a name="L2225"></a><tt class="py-lineno">2225</tt> <tt class="py-line"> <tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-2371" class="py-name"><a title="lxml.etree.QName.text
7020 lxml.etree._AppendOnlyElementProxy.text
7021 lxml.etree._Element.text
7022 lxml.etree._Entity.text
7023 lxml.etree._ModifyContentOnlyProxy.text
7024 lxml.etree._ReadOnlyEntityProxy.text
7025 lxml.etree._ReadOnlyProxy.text
7026 lxml.etree.__ContentOnlyElement.text
7027 lxml.objectify.ObjectifiedElement.text
7028 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-2371', 'text', 'link-194');">text</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"text%d"</tt> <tt class="py-op">%</tt> <tt class="py-name">i</tt> </tt>
7029 <a name="L2226"></a><tt class="py-lineno">2226</tt> <tt class="py-line"> <tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-2372" class="py-name"><a title="lxml.etree._Element.tail
7030 lxml.etree._ReadOnlyProxy.tail
7031 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-2372', 'tail', 'link-850');">tail</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"tail%d"</tt> <tt class="py-op">%</tt> <tt class="py-name">i</tt> </tt>
7032 <a name="L2227"></a><tt class="py-lineno">2227</tt> <tt class="py-line"> </tt>
7033 <a name="L2228"></a><tt class="py-lineno">2228</tt> <tt class="py-line"> <tt class="py-name">child0</tt> <tt class="py-op">=</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
7034 <a name="L2229"></a><tt class="py-lineno">2229</tt> <tt class="py-line"> <tt class="py-name">child1</tt> <tt class="py-op">=</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
7035 <a name="L2230"></a><tt class="py-lineno">2230</tt> <tt class="py-line"> <tt class="py-name">child2</tt> <tt class="py-op">=</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt> </tt>
7036 <a name="L2231"></a><tt class="py-lineno">2231</tt> <tt class="py-line"> </tt>
7037 <a name="L2232"></a><tt class="py-lineno">2232</tt> <tt class="py-line"> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-2373" class="py-name"><a title="lxml.etree._Element.replace
7038 lxml.etree._ExsltRegExp.replace" class="py-name" href="#" onclick="return doclink('link-2373', 'replace', 'link-539');">replace</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
7039 <a name="L2233"></a><tt class="py-lineno">2233</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7040 <a name="L2234"></a><tt class="py-lineno">2234</tt> <tt class="py-line"> <tt class="py-number">9</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
7041 <a name="L2235"></a><tt class="py-lineno">2235</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7042 <a name="L2236"></a><tt class="py-lineno">2236</tt> <tt class="py-line"> <tt class="py-name">child1</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
7043 <a name="L2237"></a><tt class="py-lineno">2237</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7044 <a name="L2238"></a><tt class="py-lineno">2238</tt> <tt class="py-line"> <tt class="py-name">child1</tt><tt class="py-op">.</tt><tt id="link-2374" class="py-name"><a title="lxml.etree.QName.text
7045 lxml.etree._AppendOnlyElementProxy.text
7046 lxml.etree._Element.text
7047 lxml.etree._Entity.text
7048 lxml.etree._ModifyContentOnlyProxy.text
7049 lxml.etree._ReadOnlyEntityProxy.text
7050 lxml.etree._ReadOnlyProxy.text
7051 lxml.etree.__ContentOnlyElement.text
7052 lxml.objectify.ObjectifiedElement.text
7053 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-2374', 'text', 'link-194');">text</a></tt><tt class="py-op">,</tt> <tt class="py-string">"text1"</tt><tt class="py-op">)</tt> </tt>
7054 <a name="L2239"></a><tt class="py-lineno">2239</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7055 <a name="L2240"></a><tt class="py-lineno">2240</tt> <tt class="py-line"> <tt class="py-name">child1</tt><tt class="py-op">.</tt><tt id="link-2375" class="py-name"><a title="lxml.etree._Element.tail
7056 lxml.etree._ReadOnlyProxy.tail
7057 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-2375', 'tail', 'link-850');">tail</a></tt><tt class="py-op">,</tt> <tt class="py-string">"tail1"</tt><tt class="py-op">)</tt> </tt>
7058 <a name="L2241"></a><tt class="py-lineno">2241</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7059 <a name="L2242"></a><tt class="py-lineno">2242</tt> <tt class="py-line"> <tt class="py-name">child0</tt><tt class="py-op">.</tt><tt id="link-2376" class="py-name"><a title="lxml.etree._Element.tail
7060 lxml.etree._ReadOnlyProxy.tail
7061 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-2376', 'tail', 'link-850');">tail</a></tt><tt class="py-op">,</tt> <tt class="py-string">"tail0"</tt><tt class="py-op">)</tt> </tt>
7062 <a name="L2243"></a><tt class="py-lineno">2243</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7063 <a name="L2244"></a><tt class="py-lineno">2244</tt> <tt class="py-line"> <tt class="py-name">child2</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
7064 <a name="L2245"></a><tt class="py-lineno">2245</tt> <tt class="py-line"> </tt>
7065 <a name="L2246"></a><tt class="py-lineno">2246</tt> <tt class="py-line"> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-2377" class="py-name"><a title="lxml.etree._Element.replace
7066 lxml.etree._ExsltRegExp.replace" class="py-name" href="#" onclick="return doclink('link-2377', 'replace', 'link-539');">replace</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
7067 <a name="L2247"></a><tt class="py-lineno">2247</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7068 <a name="L2248"></a><tt class="py-lineno">2248</tt> <tt class="py-line"> <tt class="py-name">child1</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
7069 <a name="L2249"></a><tt class="py-lineno">2249</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7070 <a name="L2250"></a><tt class="py-lineno">2250</tt> <tt class="py-line"> <tt class="py-name">child1</tt><tt class="py-op">.</tt><tt id="link-2378" class="py-name"><a title="lxml.etree.QName.text
7071 lxml.etree._AppendOnlyElementProxy.text
7072 lxml.etree._Element.text
7073 lxml.etree._Entity.text
7074 lxml.etree._ModifyContentOnlyProxy.text
7075 lxml.etree._ReadOnlyEntityProxy.text
7076 lxml.etree._ReadOnlyProxy.text
7077 lxml.etree.__ContentOnlyElement.text
7078 lxml.objectify.ObjectifiedElement.text
7079 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-2378', 'text', 'link-194');">text</a></tt><tt class="py-op">,</tt> <tt class="py-string">"text1"</tt><tt class="py-op">)</tt> </tt>
7080 <a name="L2251"></a><tt class="py-lineno">2251</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7081 <a name="L2252"></a><tt class="py-lineno">2252</tt> <tt class="py-line"> <tt class="py-name">child1</tt><tt class="py-op">.</tt><tt id="link-2379" class="py-name"><a title="lxml.etree._Element.tail
7082 lxml.etree._ReadOnlyProxy.tail
7083 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-2379', 'tail', 'link-850');">tail</a></tt><tt class="py-op">,</tt> <tt class="py-string">"tail1"</tt><tt class="py-op">)</tt> </tt>
7084 <a name="L2253"></a><tt class="py-lineno">2253</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7085 <a name="L2254"></a><tt class="py-lineno">2254</tt> <tt class="py-line"> <tt class="py-name">child2</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
7086 </div><a name="L2255"></a><tt class="py-lineno">2255</tt> <tt class="py-line"> </tt>
7087 <a name="ETreeOnlyTestCase.test_replace_new"></a><div id="ETreeOnlyTestCase.test_replace_new-def"><a name="L2256"></a><tt class="py-lineno">2256</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_replace_new-toggle" onclick="return toggle('ETreeOnlyTestCase.test_replace_new');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_replace_new">test_replace_new</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7088 </div><div id="ETreeOnlyTestCase.test_replace_new-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_replace_new-expanded"><a name="L2257"></a><tt class="py-lineno">2257</tt> <tt class="py-line"> <tt id="link-2380" class="py-name"><a title="lxml.etree
7089 lxml.sax.ElementTreeContentHandler.etree
7090 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7091 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7092 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2380', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2381" class="py-name"><a title="lxml.etree
7093 lxml.sax.ElementTreeContentHandler.etree
7094 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7095 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7096 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2381', 'etree', 'link-10');">etree</a></tt> </tt>
7097 <a name="L2258"></a><tt class="py-lineno">2258</tt> <tt class="py-line"> <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt id="link-2382" class="py-name"><a title="lxml.etree
7098 lxml.sax.ElementTreeContentHandler.etree
7099 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7100 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7101 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2382', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2383" class="py-name"><a title="lxml.cssselect.Element
7104 lxml.objectify.Element
7105 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7106 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2383', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'foo'</tt><tt class="py-op">)</tt> </tt>
7107 <a name="L2259"></a><tt class="py-lineno">2259</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-number">10</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7108 <a name="L2260"></a><tt class="py-lineno">2260</tt> <tt class="py-line"> <tt id="link-2384" class="py-name"><a title="lxml.etree
7109 lxml.sax.ElementTreeContentHandler.etree
7110 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7111 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7112 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2384', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2385" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2385', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">,</tt> <tt class="py-string">'a%s'</tt> <tt class="py-op">%</tt> <tt class="py-name">i</tt><tt class="py-op">)</tt> </tt>
7113 <a name="L2261"></a><tt class="py-lineno">2261</tt> <tt class="py-line"> </tt>
7114 <a name="L2262"></a><tt class="py-lineno">2262</tt> <tt class="py-line"> <tt class="py-name">new_element</tt> <tt class="py-op">=</tt> <tt id="link-2386" class="py-name"><a title="lxml.etree
7115 lxml.sax.ElementTreeContentHandler.etree
7116 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7117 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7118 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2386', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2387" class="py-name"><a title="lxml.cssselect.Element
7121 lxml.objectify.Element
7122 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7123 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2387', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">"test"</tt><tt class="py-op">)</tt> </tt>
7124 <a name="L2263"></a><tt class="py-lineno">2263</tt> <tt class="py-line"> <tt class="py-name">new_element</tt><tt class="py-op">.</tt><tt id="link-2388" class="py-name"><a title="lxml.etree.QName.text
7125 lxml.etree._AppendOnlyElementProxy.text
7126 lxml.etree._Element.text
7127 lxml.etree._Entity.text
7128 lxml.etree._ModifyContentOnlyProxy.text
7129 lxml.etree._ReadOnlyEntityProxy.text
7130 lxml.etree._ReadOnlyProxy.text
7131 lxml.etree.__ContentOnlyElement.text
7132 lxml.objectify.ObjectifiedElement.text
7133 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-2388', 'text', 'link-194');">text</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"TESTTEXT"</tt> </tt>
7134 <a name="L2264"></a><tt class="py-lineno">2264</tt> <tt class="py-line"> <tt class="py-name">new_element</tt><tt class="py-op">.</tt><tt id="link-2389" class="py-name"><a title="lxml.etree._Element.tail
7135 lxml.etree._ReadOnlyProxy.tail
7136 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-2389', 'tail', 'link-850');">tail</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"TESTTAIL"</tt> </tt>
7137 <a name="L2265"></a><tt class="py-lineno">2265</tt> <tt class="py-line"> <tt class="py-name">child1</tt> <tt class="py-op">=</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
7138 <a name="L2266"></a><tt class="py-lineno">2266</tt> <tt class="py-line"> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-2390" class="py-name"><a title="lxml.etree._Element.replace
7139 lxml.etree._ExsltRegExp.replace" class="py-name" href="#" onclick="return doclink('link-2390', 'replace', 'link-539');">replace</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">new_element</tt><tt class="py-op">)</tt> </tt>
7140 <a name="L2267"></a><tt class="py-lineno">2267</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7141 <a name="L2268"></a><tt class="py-lineno">2268</tt> <tt class="py-line"> <tt class="py-name">new_element</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
7142 <a name="L2269"></a><tt class="py-lineno">2269</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7143 <a name="L2270"></a><tt class="py-lineno">2270</tt> <tt class="py-line"> <tt class="py-string">"TESTTEXT"</tt><tt class="py-op">,</tt> </tt>
7144 <a name="L2271"></a><tt class="py-lineno">2271</tt> <tt class="py-line"> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-2391" class="py-name"><a title="lxml.etree.QName.text
7145 lxml.etree._AppendOnlyElementProxy.text
7146 lxml.etree._Element.text
7147 lxml.etree._Entity.text
7148 lxml.etree._ModifyContentOnlyProxy.text
7149 lxml.etree._ReadOnlyEntityProxy.text
7150 lxml.etree._ReadOnlyProxy.text
7151 lxml.etree.__ContentOnlyElement.text
7152 lxml.objectify.ObjectifiedElement.text
7153 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-2391', 'text', 'link-194');">text</a></tt><tt class="py-op">)</tt> </tt>
7154 <a name="L2272"></a><tt class="py-lineno">2272</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7155 <a name="L2273"></a><tt class="py-lineno">2273</tt> <tt class="py-line"> <tt class="py-string">"TESTTAIL"</tt><tt class="py-op">,</tt> </tt>
7156 <a name="L2274"></a><tt class="py-lineno">2274</tt> <tt class="py-line"> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-2392" class="py-name"><a title="lxml.etree._Element.tail
7157 lxml.etree._ReadOnlyProxy.tail
7158 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-2392', 'tail', 'link-850');">tail</a></tt><tt class="py-op">)</tt> </tt>
7159 <a name="L2275"></a><tt class="py-lineno">2275</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7160 <a name="L2276"></a><tt class="py-lineno">2276</tt> <tt class="py-line"> <tt class="py-name">child1</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
7161 </div><a name="L2277"></a><tt class="py-lineno">2277</tt> <tt class="py-line"> </tt>
7162 <a name="ETreeOnlyTestCase.test_setslice_all_empty_reversed"></a><div id="ETreeOnlyTestCase.test_setslice_all_empty_reversed-def"><a name="L2278"></a><tt class="py-lineno">2278</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_setslice_all_empty_reversed-toggle" onclick="return toggle('ETreeOnlyTestCase.test_setslice_all_empty_reversed');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_setslice_all_empty_reversed">test_setslice_all_empty_reversed</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7163 </div><div id="ETreeOnlyTestCase.test_setslice_all_empty_reversed-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_setslice_all_empty_reversed-expanded"><a name="L2279"></a><tt class="py-lineno">2279</tt> <tt class="py-line"> <tt id="link-2393" class="py-name"><a title="lxml.cssselect.Element
7166 lxml.objectify.Element
7167 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7168 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2393', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2394" class="py-name"><a title="lxml.etree
7169 lxml.sax.ElementTreeContentHandler.etree
7170 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7171 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7172 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2394', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2395" class="py-name"><a title="lxml.cssselect.Element
7175 lxml.objectify.Element
7176 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7177 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2395', 'Element', 'link-69');">Element</a></tt> </tt>
7178 <a name="L2280"></a><tt class="py-lineno">2280</tt> <tt class="py-line"> <tt id="link-2396" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2396', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2397" class="py-name"><a title="lxml.etree
7179 lxml.sax.ElementTreeContentHandler.etree
7180 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7181 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7182 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2397', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2398" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2398', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
7183 <a name="L2281"></a><tt class="py-lineno">2281</tt> <tt class="py-line"> </tt>
7184 <a name="L2282"></a><tt class="py-lineno">2282</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-2399" class="py-name"><a title="lxml.cssselect.Element
7187 lxml.objectify.Element
7188 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7189 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2399', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
7190 <a name="L2283"></a><tt class="py-lineno">2283</tt> <tt class="py-line"> </tt>
7191 <a name="L2284"></a><tt class="py-lineno">2284</tt> <tt class="py-line"> <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt id="link-2400" class="py-name"><a title="lxml.cssselect.Element
7194 lxml.objectify.Element
7195 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7196 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2400', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'e'</tt><tt class="py-op">)</tt> </tt>
7197 <a name="L2285"></a><tt class="py-lineno">2285</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt id="link-2401" class="py-name"><a title="lxml.cssselect.Element
7200 lxml.objectify.Element
7201 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7202 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2401', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'f'</tt><tt class="py-op">)</tt> </tt>
7203 <a name="L2286"></a><tt class="py-lineno">2286</tt> <tt class="py-line"> <tt class="py-name">g</tt> <tt class="py-op">=</tt> <tt id="link-2402" class="py-name"><a title="lxml.cssselect.Element
7206 lxml.objectify.Element
7207 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7208 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2402', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'g'</tt><tt class="py-op">)</tt> </tt>
7209 <a name="L2287"></a><tt class="py-lineno">2287</tt> <tt class="py-line"> </tt>
7210 <a name="L2288"></a><tt class="py-lineno">2288</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">e</tt><tt class="py-op">,</tt> <tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">g</tt><tt class="py-op">]</tt> </tt>
7211 <a name="L2289"></a><tt class="py-lineno">2289</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">s</tt> </tt>
7212 <a name="L2290"></a><tt class="py-lineno">2290</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7213 <a name="L2291"></a><tt class="py-lineno">2291</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">g</tt><tt class="py-op">,</tt> <tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
7214 <a name="L2292"></a><tt class="py-lineno">2292</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
7215 </div><a name="L2293"></a><tt class="py-lineno">2293</tt> <tt class="py-line"> </tt>
7216 <a name="ETreeOnlyTestCase.test_setslice_step"></a><div id="ETreeOnlyTestCase.test_setslice_step-def"><a name="L2294"></a><tt class="py-lineno">2294</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_setslice_step-toggle" onclick="return toggle('ETreeOnlyTestCase.test_setslice_step');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_setslice_step">test_setslice_step</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7217 </div><div id="ETreeOnlyTestCase.test_setslice_step-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_setslice_step-expanded"><a name="L2295"></a><tt class="py-lineno">2295</tt> <tt class="py-line"> <tt id="link-2403" class="py-name"><a title="lxml.cssselect.Element
7220 lxml.objectify.Element
7221 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7222 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2403', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2404" class="py-name"><a title="lxml.etree
7223 lxml.sax.ElementTreeContentHandler.etree
7224 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7225 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7226 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2404', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2405" class="py-name"><a title="lxml.cssselect.Element
7229 lxml.objectify.Element
7230 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7231 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2405', 'Element', 'link-69');">Element</a></tt> </tt>
7232 <a name="L2296"></a><tt class="py-lineno">2296</tt> <tt class="py-line"> <tt id="link-2406" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2406', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2407" class="py-name"><a title="lxml.etree
7233 lxml.sax.ElementTreeContentHandler.etree
7234 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7235 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7236 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2407', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2408" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2408', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
7237 <a name="L2297"></a><tt class="py-lineno">2297</tt> <tt class="py-line"> </tt>
7238 <a name="L2298"></a><tt class="py-lineno">2298</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-2409" class="py-name"><a title="lxml.cssselect.Element
7241 lxml.objectify.Element
7242 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7243 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2409', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
7244 <a name="L2299"></a><tt class="py-lineno">2299</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-2410" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2410', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
7245 <a name="L2300"></a><tt class="py-lineno">2300</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-2411" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2411', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
7246 <a name="L2301"></a><tt class="py-lineno">2301</tt> <tt class="py-line"> <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt id="link-2412" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2412', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'d'</tt><tt class="py-op">)</tt> </tt>
7247 <a name="L2302"></a><tt class="py-lineno">2302</tt> <tt class="py-line"> <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt id="link-2413" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2413', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'e'</tt><tt class="py-op">)</tt> </tt>
7248 <a name="L2303"></a><tt class="py-lineno">2303</tt> <tt class="py-line"> </tt>
7249 <a name="L2304"></a><tt class="py-lineno">2304</tt> <tt class="py-line"> <tt class="py-name">x</tt> <tt class="py-op">=</tt> <tt id="link-2414" class="py-name"><a title="lxml.cssselect.Element
7252 lxml.objectify.Element
7253 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7254 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2414', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'x'</tt><tt class="py-op">)</tt> </tt>
7255 <a name="L2305"></a><tt class="py-lineno">2305</tt> <tt class="py-line"> <tt class="py-name">y</tt> <tt class="py-op">=</tt> <tt id="link-2415" class="py-name"><a title="lxml.cssselect.Element
7258 lxml.objectify.Element
7259 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7260 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2415', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'y'</tt><tt class="py-op">)</tt> </tt>
7261 <a name="L2306"></a><tt class="py-lineno">2306</tt> <tt class="py-line"> </tt>
7262 <a name="L2307"></a><tt class="py-lineno">2307</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">:</tt><tt class="py-number">2</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">x</tt><tt class="py-op">,</tt> <tt class="py-name">y</tt><tt class="py-op">]</tt> </tt>
7263 <a name="L2308"></a><tt class="py-lineno">2308</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7264 <a name="L2309"></a><tt class="py-lineno">2309</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">b</tt><tt class="py-op">,</tt> <tt class="py-name">x</tt><tt class="py-op">,</tt> <tt class="py-name">d</tt><tt class="py-op">,</tt> <tt class="py-name">y</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
7265 <a name="L2310"></a><tt class="py-lineno">2310</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
7266 </div><a name="L2311"></a><tt class="py-lineno">2311</tt> <tt class="py-line"> </tt>
7267 <a name="ETreeOnlyTestCase.test_setslice_step_negative"></a><div id="ETreeOnlyTestCase.test_setslice_step_negative-def"><a name="L2312"></a><tt class="py-lineno">2312</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_setslice_step_negative-toggle" onclick="return toggle('ETreeOnlyTestCase.test_setslice_step_negative');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_setslice_step_negative">test_setslice_step_negative</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7268 </div><div id="ETreeOnlyTestCase.test_setslice_step_negative-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_setslice_step_negative-expanded"><a name="L2313"></a><tt class="py-lineno">2313</tt> <tt class="py-line"> <tt id="link-2416" class="py-name"><a title="lxml.cssselect.Element
7271 lxml.objectify.Element
7272 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7273 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2416', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2417" class="py-name"><a title="lxml.etree
7274 lxml.sax.ElementTreeContentHandler.etree
7275 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7276 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7277 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2417', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2418" class="py-name"><a title="lxml.cssselect.Element
7280 lxml.objectify.Element
7281 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7282 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2418', 'Element', 'link-69');">Element</a></tt> </tt>
7283 <a name="L2314"></a><tt class="py-lineno">2314</tt> <tt class="py-line"> <tt id="link-2419" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2419', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2420" class="py-name"><a title="lxml.etree
7284 lxml.sax.ElementTreeContentHandler.etree
7285 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7286 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7287 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2420', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2421" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2421', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
7288 <a name="L2315"></a><tt class="py-lineno">2315</tt> <tt class="py-line"> </tt>
7289 <a name="L2316"></a><tt class="py-lineno">2316</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-2422" class="py-name"><a title="lxml.cssselect.Element
7292 lxml.objectify.Element
7293 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7294 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2422', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
7295 <a name="L2317"></a><tt class="py-lineno">2317</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-2423" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2423', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
7296 <a name="L2318"></a><tt class="py-lineno">2318</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-2424" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2424', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
7297 <a name="L2319"></a><tt class="py-lineno">2319</tt> <tt class="py-line"> <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt id="link-2425" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2425', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'d'</tt><tt class="py-op">)</tt> </tt>
7298 <a name="L2320"></a><tt class="py-lineno">2320</tt> <tt class="py-line"> <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt id="link-2426" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2426', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'e'</tt><tt class="py-op">)</tt> </tt>
7299 <a name="L2321"></a><tt class="py-lineno">2321</tt> <tt class="py-line"> </tt>
7300 <a name="L2322"></a><tt class="py-lineno">2322</tt> <tt class="py-line"> <tt class="py-name">x</tt> <tt class="py-op">=</tt> <tt id="link-2427" class="py-name"><a title="lxml.cssselect.Element
7303 lxml.objectify.Element
7304 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7305 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2427', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'x'</tt><tt class="py-op">)</tt> </tt>
7306 <a name="L2323"></a><tt class="py-lineno">2323</tt> <tt class="py-line"> <tt class="py-name">y</tt> <tt class="py-op">=</tt> <tt id="link-2428" class="py-name"><a title="lxml.cssselect.Element
7309 lxml.objectify.Element
7310 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7311 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2428', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'y'</tt><tt class="py-op">)</tt> </tt>
7312 <a name="L2324"></a><tt class="py-lineno">2324</tt> <tt class="py-line"> </tt>
7313 <a name="L2325"></a><tt class="py-lineno">2325</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">x</tt><tt class="py-op">,</tt> <tt class="py-name">y</tt><tt class="py-op">]</tt> </tt>
7314 <a name="L2326"></a><tt class="py-lineno">2326</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7315 <a name="L2327"></a><tt class="py-lineno">2327</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">y</tt><tt class="py-op">,</tt> <tt class="py-name">x</tt><tt class="py-op">,</tt> <tt class="py-name">d</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
7316 <a name="L2328"></a><tt class="py-lineno">2328</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
7317 </div><a name="L2329"></a><tt class="py-lineno">2329</tt> <tt class="py-line"> </tt>
7318 <a name="ETreeOnlyTestCase.test_setslice_step_negative2"></a><div id="ETreeOnlyTestCase.test_setslice_step_negative2-def"><a name="L2330"></a><tt class="py-lineno">2330</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_setslice_step_negative2-toggle" onclick="return toggle('ETreeOnlyTestCase.test_setslice_step_negative2');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_setslice_step_negative2">test_setslice_step_negative2</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7319 </div><div id="ETreeOnlyTestCase.test_setslice_step_negative2-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_setslice_step_negative2-expanded"><a name="L2331"></a><tt class="py-lineno">2331</tt> <tt class="py-line"> <tt id="link-2429" class="py-name"><a title="lxml.cssselect.Element
7322 lxml.objectify.Element
7323 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7324 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2429', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2430" class="py-name"><a title="lxml.etree
7325 lxml.sax.ElementTreeContentHandler.etree
7326 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7327 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7328 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2430', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2431" class="py-name"><a title="lxml.cssselect.Element
7331 lxml.objectify.Element
7332 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7333 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2431', 'Element', 'link-69');">Element</a></tt> </tt>
7334 <a name="L2332"></a><tt class="py-lineno">2332</tt> <tt class="py-line"> <tt id="link-2432" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2432', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2433" class="py-name"><a title="lxml.etree
7335 lxml.sax.ElementTreeContentHandler.etree
7336 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7337 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7338 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2433', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2434" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2434', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
7339 <a name="L2333"></a><tt class="py-lineno">2333</tt> <tt class="py-line"> </tt>
7340 <a name="L2334"></a><tt class="py-lineno">2334</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-2435" class="py-name"><a title="lxml.cssselect.Element
7343 lxml.objectify.Element
7344 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7345 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2435', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
7346 <a name="L2335"></a><tt class="py-lineno">2335</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-2436" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2436', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
7347 <a name="L2336"></a><tt class="py-lineno">2336</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-2437" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2437', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
7348 <a name="L2337"></a><tt class="py-lineno">2337</tt> <tt class="py-line"> <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt id="link-2438" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2438', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'d'</tt><tt class="py-op">)</tt> </tt>
7349 <a name="L2338"></a><tt class="py-lineno">2338</tt> <tt class="py-line"> <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt id="link-2439" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2439', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'e'</tt><tt class="py-op">)</tt> </tt>
7350 <a name="L2339"></a><tt class="py-lineno">2339</tt> <tt class="py-line"> </tt>
7351 <a name="L2340"></a><tt class="py-lineno">2340</tt> <tt class="py-line"> <tt class="py-name">x</tt> <tt class="py-op">=</tt> <tt id="link-2440" class="py-name"><a title="lxml.cssselect.Element
7354 lxml.objectify.Element
7355 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7356 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2440', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'x'</tt><tt class="py-op">)</tt> </tt>
7357 <a name="L2341"></a><tt class="py-lineno">2341</tt> <tt class="py-line"> <tt class="py-name">y</tt> <tt class="py-op">=</tt> <tt id="link-2441" class="py-name"><a title="lxml.cssselect.Element
7360 lxml.objectify.Element
7361 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7362 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2441', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'y'</tt><tt class="py-op">)</tt> </tt>
7363 <a name="L2342"></a><tt class="py-lineno">2342</tt> <tt class="py-line"> </tt>
7364 <a name="L2343"></a><tt class="py-lineno">2343</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">2</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">x</tt><tt class="py-op">,</tt> <tt class="py-name">y</tt><tt class="py-op">]</tt> </tt>
7365 <a name="L2344"></a><tt class="py-lineno">2344</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7366 <a name="L2345"></a><tt class="py-lineno">2345</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">b</tt><tt class="py-op">,</tt> <tt class="py-name">y</tt><tt class="py-op">,</tt> <tt class="py-name">d</tt><tt class="py-op">,</tt> <tt class="py-name">x</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
7367 <a name="L2346"></a><tt class="py-lineno">2346</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
7368 </div><a name="L2347"></a><tt class="py-lineno">2347</tt> <tt class="py-line"> </tt>
7369 <a name="ETreeOnlyTestCase.test_setslice_step_overrun"></a><div id="ETreeOnlyTestCase.test_setslice_step_overrun-def"><a name="L2348"></a><tt class="py-lineno">2348</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_setslice_step_overrun-toggle" onclick="return toggle('ETreeOnlyTestCase.test_setslice_step_overrun');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_setslice_step_overrun">test_setslice_step_overrun</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7370 </div><div id="ETreeOnlyTestCase.test_setslice_step_overrun-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_setslice_step_overrun-expanded"><a name="L2349"></a><tt class="py-lineno">2349</tt> <tt class="py-line"> <tt id="link-2442" class="py-name"><a title="lxml.cssselect.Element
7373 lxml.objectify.Element
7374 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7375 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2442', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2443" class="py-name"><a title="lxml.etree
7376 lxml.sax.ElementTreeContentHandler.etree
7377 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7378 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7379 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2443', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2444" class="py-name"><a title="lxml.cssselect.Element
7382 lxml.objectify.Element
7383 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7384 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2444', 'Element', 'link-69');">Element</a></tt> </tt>
7385 <a name="L2350"></a><tt class="py-lineno">2350</tt> <tt class="py-line"> <tt id="link-2445" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2445', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2446" class="py-name"><a title="lxml.etree
7386 lxml.sax.ElementTreeContentHandler.etree
7387 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7388 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7389 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2446', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2447" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2447', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
7390 <a name="L2351"></a><tt class="py-lineno">2351</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
7391 <a name="L2352"></a><tt class="py-lineno">2352</tt> <tt class="py-line"> <tt class="py-name">slice</tt> </tt>
7392 <a name="L2353"></a><tt class="py-lineno">2353</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">NameError</tt><tt class="py-op">:</tt> </tt>
7393 <a name="L2354"></a><tt class="py-lineno">2354</tt> <tt class="py-line"> <tt class="py-keyword">print</tt><tt class="py-op">(</tt><tt class="py-string">"slice() not found"</tt><tt class="py-op">)</tt> </tt>
7394 <a name="L2355"></a><tt class="py-lineno">2355</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt>
7395 <a name="L2356"></a><tt class="py-lineno">2356</tt> <tt class="py-line"> </tt>
7396 <a name="L2357"></a><tt class="py-lineno">2357</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-2448" class="py-name"><a title="lxml.cssselect.Element
7399 lxml.objectify.Element
7400 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7401 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2448', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
7402 <a name="L2358"></a><tt class="py-lineno">2358</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-2449" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2449', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
7403 <a name="L2359"></a><tt class="py-lineno">2359</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-2450" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2450', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
7404 <a name="L2360"></a><tt class="py-lineno">2360</tt> <tt class="py-line"> <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt id="link-2451" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2451', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'d'</tt><tt class="py-op">)</tt> </tt>
7405 <a name="L2361"></a><tt class="py-lineno">2361</tt> <tt class="py-line"> <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt id="link-2452" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2452', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'e'</tt><tt class="py-op">)</tt> </tt>
7406 <a name="L2362"></a><tt class="py-lineno">2362</tt> <tt class="py-line"> </tt>
7407 <a name="L2363"></a><tt class="py-lineno">2363</tt> <tt class="py-line"> <tt class="py-name">x</tt> <tt class="py-op">=</tt> <tt id="link-2453" class="py-name"><a title="lxml.cssselect.Element
7410 lxml.objectify.Element
7411 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7412 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2453', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'x'</tt><tt class="py-op">)</tt> </tt>
7413 <a name="L2364"></a><tt class="py-lineno">2364</tt> <tt class="py-line"> <tt class="py-name">y</tt> <tt class="py-op">=</tt> <tt id="link-2454" class="py-name"><a title="lxml.cssselect.Element
7416 lxml.objectify.Element
7417 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7418 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2454', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'y'</tt><tt class="py-op">)</tt> </tt>
7419 <a name="L2365"></a><tt class="py-lineno">2365</tt> <tt class="py-line"> <tt class="py-name">z</tt> <tt class="py-op">=</tt> <tt id="link-2455" class="py-name"><a title="lxml.cssselect.Element
7422 lxml.objectify.Element
7423 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7424 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2455', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'z'</tt><tt class="py-op">)</tt> </tt>
7425 <a name="L2366"></a><tt class="py-lineno">2366</tt> <tt class="py-line"> </tt>
7426 <a name="L2367"></a><tt class="py-lineno">2367</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt> </tt>
7427 <a name="L2368"></a><tt class="py-lineno">2368</tt> <tt class="py-line"> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> </tt>
7428 <a name="L2369"></a><tt class="py-lineno">2369</tt> <tt class="py-line"> <tt class="py-name">operator</tt><tt class="py-op">.</tt><tt class="py-name">setitem</tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-name">slice</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">,</tt><tt class="py-name">None</tt><tt class="py-op">,</tt><tt class="py-number">2</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-name">x</tt><tt class="py-op">,</tt> <tt class="py-name">y</tt><tt class="py-op">,</tt> <tt class="py-name">z</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
7429 <a name="L2370"></a><tt class="py-lineno">2370</tt> <tt class="py-line"> </tt>
7430 <a name="L2371"></a><tt class="py-lineno">2371</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7431 <a name="L2372"></a><tt class="py-lineno">2372</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-name">b</tt><tt class="py-op">,</tt> <tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-name">d</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
7432 <a name="L2373"></a><tt class="py-lineno">2373</tt> <tt class="py-line"> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
7433 </div><a name="L2374"></a><tt class="py-lineno">2374</tt> <tt class="py-line"> </tt>
7434 <a name="ETreeOnlyTestCase.test_sourceline_XML"></a><div id="ETreeOnlyTestCase.test_sourceline_XML-def"><a name="L2375"></a><tt class="py-lineno">2375</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_sourceline_XML-toggle" onclick="return toggle('ETreeOnlyTestCase.test_sourceline_XML');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_sourceline_XML">test_sourceline_XML</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7435 </div><div id="ETreeOnlyTestCase.test_sourceline_XML-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_sourceline_XML-expanded"><a name="L2376"></a><tt class="py-lineno">2376</tt> <tt class="py-line"> <tt id="link-2456" class="py-name"><a title="lxml.etree.XML
7437 lxml.tests.test_objectify.ObjectifyTestCase.XML
7438 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2456', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2457" class="py-name"><a title="lxml.etree
7439 lxml.sax.ElementTreeContentHandler.etree
7440 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7441 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7442 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2457', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2458" class="py-name"><a title="lxml.etree.XML
7444 lxml.tests.test_objectify.ObjectifyTestCase.XML
7445 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2458', 'XML', 'link-217');">XML</a></tt> </tt>
7446 <a name="L2377"></a><tt class="py-lineno">2377</tt> <tt class="py-line"> <tt id="link-2459" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2459', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-2460" class="py-name"><a title="lxml.etree.XML
7448 lxml.tests.test_objectify.ObjectifyTestCase.XML
7449 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2460', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-2461" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2461', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'''<?xml version="1.0"?></tt> </tt>
7450 <a name="L2378"></a><tt class="py-lineno">2378</tt> <tt class="py-line"><tt class="py-string"> <root><test></tt> </tt>
7451 <a name="L2379"></a><tt class="py-lineno">2379</tt> <tt class="py-line"><tt class="py-string"></tt> </tt>
7452 <a name="L2380"></a><tt class="py-lineno">2380</tt> <tt class="py-line"><tt class="py-string"> <bla/></test></tt> </tt>
7453 <a name="L2381"></a><tt class="py-lineno">2381</tt> <tt class="py-line"><tt class="py-string"> </root></tt> </tt>
7454 <a name="L2382"></a><tt class="py-lineno">2382</tt> <tt class="py-line"><tt class="py-string"> '''</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
7455 <a name="L2383"></a><tt class="py-lineno">2383</tt> <tt class="py-line"> </tt>
7456 <a name="L2384"></a><tt class="py-lineno">2384</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7457 <a name="L2385"></a><tt class="py-lineno">2385</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">,</tt> <tt class="py-number">2</tt><tt class="py-op">,</tt> <tt class="py-number">4</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
7458 <a name="L2386"></a><tt class="py-lineno">2386</tt> <tt class="py-line"> <tt class="py-op">[</tt> <tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-2462" class="py-name" targets="Variable lxml.etree._Element.sourceline=lxml.etree._Element-class.html#sourceline,Variable lxml.etree._ReadOnlyProxy.sourceline=lxml.etree._ReadOnlyProxy-class.html#sourceline"><a title="lxml.etree._Element.sourceline
7459 lxml.etree._ReadOnlyProxy.sourceline" class="py-name" href="#" onclick="return doclink('link-2462', 'sourceline', 'link-2462');">sourceline</a></tt> <tt class="py-keyword">for</tt> <tt class="py-name">el</tt> <tt class="py-keyword">in</tt> <tt id="link-2463" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2463', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-2464" class="py-name"><a title="lxml.etree._Element.getiterator
7460 lxml.etree._ElementTree.getiterator" class="py-name" href="#" onclick="return doclink('link-2464', 'getiterator', 'link-1163');">getiterator</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
7461 </div><a name="L2387"></a><tt class="py-lineno">2387</tt> <tt class="py-line"> </tt>
7462 <a name="ETreeOnlyTestCase.test_sourceline_parse"></a><div id="ETreeOnlyTestCase.test_sourceline_parse-def"><a name="L2388"></a><tt class="py-lineno">2388</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_sourceline_parse-toggle" onclick="return toggle('ETreeOnlyTestCase.test_sourceline_parse');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_sourceline_parse">test_sourceline_parse</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7463 </div><div id="ETreeOnlyTestCase.test_sourceline_parse-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_sourceline_parse-expanded"><a name="L2389"></a><tt class="py-lineno">2389</tt> <tt class="py-line"> <tt id="link-2465" class="py-name"><a title="lxml.cssselect.parse
7464 lxml.etree._ElementTree.parse
7466 lxml.html.ElementSoup.parse
7467 lxml.html.html5parser.parse
7469 lxml.html.soupparser.parse
7470 lxml.objectify.parse
7471 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-2465', 'parse', 'link-757');">parse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2466" class="py-name"><a title="lxml.etree
7472 lxml.sax.ElementTreeContentHandler.etree
7473 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7474 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7475 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2466', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2467" class="py-name"><a title="lxml.cssselect.parse
7476 lxml.etree._ElementTree.parse
7478 lxml.html.ElementSoup.parse
7479 lxml.html.html5parser.parse
7481 lxml.html.soupparser.parse
7482 lxml.objectify.parse
7483 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-2467', 'parse', 'link-757');">parse</a></tt> </tt>
7484 <a name="L2390"></a><tt class="py-lineno">2390</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-2468" class="py-name"><a title="lxml.cssselect.parse
7485 lxml.etree._ElementTree.parse
7487 lxml.html.ElementSoup.parse
7488 lxml.html.html5parser.parse
7490 lxml.html.soupparser.parse
7491 lxml.objectify.parse
7492 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-2468', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt id="link-2469" class="py-name"><a title="lxml.tests.common_imports.fileInTestDir" class="py-name" href="#" onclick="return doclink('link-2469', 'fileInTestDir', 'link-12');">fileInTestDir</a></tt><tt class="py-op">(</tt><tt class="py-string">'include/test_xinclude.xml'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
7493 <a name="L2391"></a><tt class="py-lineno">2391</tt> <tt class="py-line"> </tt>
7494 <a name="L2392"></a><tt class="py-lineno">2392</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7495 <a name="L2393"></a><tt class="py-lineno">2393</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-number">2</tt><tt class="py-op">,</tt> <tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
7496 <a name="L2394"></a><tt class="py-lineno">2394</tt> <tt class="py-line"> <tt class="py-op">[</tt> <tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-2470" class="py-name"><a title="lxml.etree._Element.sourceline
7497 lxml.etree._ReadOnlyProxy.sourceline" class="py-name" href="#" onclick="return doclink('link-2470', 'sourceline', 'link-2462');">sourceline</a></tt> <tt class="py-keyword">for</tt> <tt class="py-name">el</tt> <tt class="py-keyword">in</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-2471" class="py-name"><a title="lxml.etree._Element.getiterator
7498 lxml.etree._ElementTree.getiterator" class="py-name" href="#" onclick="return doclink('link-2471', 'getiterator', 'link-1163');">getiterator</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
7499 </div><a name="L2395"></a><tt class="py-lineno">2395</tt> <tt class="py-line"> </tt>
7500 <a name="ETreeOnlyTestCase.test_sourceline_iterparse_end"></a><div id="ETreeOnlyTestCase.test_sourceline_iterparse_end-def"><a name="L2396"></a><tt class="py-lineno">2396</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_sourceline_iterparse_end-toggle" onclick="return toggle('ETreeOnlyTestCase.test_sourceline_iterparse_end');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_sourceline_iterparse_end">test_sourceline_iterparse_end</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7501 </div><div id="ETreeOnlyTestCase.test_sourceline_iterparse_end-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_sourceline_iterparse_end-expanded"><a name="L2397"></a><tt class="py-lineno">2397</tt> <tt class="py-line"> <tt id="link-2472" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-2472', 'iterparse', 'link-782');">iterparse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2473" class="py-name"><a title="lxml.etree
7502 lxml.sax.ElementTreeContentHandler.etree
7503 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7504 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7505 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2473', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2474" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-2474', 'iterparse', 'link-782');">iterparse</a></tt> </tt>
7506 <a name="L2398"></a><tt class="py-lineno">2398</tt> <tt class="py-line"> <tt class="py-name">lines</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt> <tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-2475" class="py-name"><a title="lxml.etree._Element.sourceline
7507 lxml.etree._ReadOnlyProxy.sourceline" class="py-name" href="#" onclick="return doclink('link-2475', 'sourceline', 'link-2462');">sourceline</a></tt> <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">event</tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> </tt>
7508 <a name="L2399"></a><tt class="py-lineno">2399</tt> <tt class="py-line"> <tt id="link-2476" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-2476', 'iterparse', 'link-782');">iterparse</a></tt><tt class="py-op">(</tt><tt id="link-2477" class="py-name"><a title="lxml.tests.common_imports.fileInTestDir" class="py-name" href="#" onclick="return doclink('link-2477', 'fileInTestDir', 'link-12');">fileInTestDir</a></tt><tt class="py-op">(</tt><tt class="py-string">'include/test_xinclude.xml'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-op">]</tt> </tt>
7509 <a name="L2400"></a><tt class="py-lineno">2400</tt> <tt class="py-line"> </tt>
7510 <a name="L2401"></a><tt class="py-lineno">2401</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7511 <a name="L2402"></a><tt class="py-lineno">2402</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">,</tt> <tt class="py-number">3</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
7512 <a name="L2403"></a><tt class="py-lineno">2403</tt> <tt class="py-line"> <tt class="py-name">lines</tt><tt class="py-op">)</tt> </tt>
7513 </div><a name="L2404"></a><tt class="py-lineno">2404</tt> <tt class="py-line"> </tt>
7514 <a name="ETreeOnlyTestCase.test_sourceline_iterparse_start"></a><div id="ETreeOnlyTestCase.test_sourceline_iterparse_start-def"><a name="L2405"></a><tt class="py-lineno">2405</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_sourceline_iterparse_start-toggle" onclick="return toggle('ETreeOnlyTestCase.test_sourceline_iterparse_start');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_sourceline_iterparse_start">test_sourceline_iterparse_start</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7515 </div><div id="ETreeOnlyTestCase.test_sourceline_iterparse_start-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_sourceline_iterparse_start-expanded"><a name="L2406"></a><tt class="py-lineno">2406</tt> <tt class="py-line"> <tt id="link-2478" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-2478', 'iterparse', 'link-782');">iterparse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2479" class="py-name"><a title="lxml.etree
7516 lxml.sax.ElementTreeContentHandler.etree
7517 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7518 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7519 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2479', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2480" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-2480', 'iterparse', 'link-782');">iterparse</a></tt> </tt>
7520 <a name="L2407"></a><tt class="py-lineno">2407</tt> <tt class="py-line"> <tt class="py-name">lines</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt> <tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-2481" class="py-name"><a title="lxml.etree._Element.sourceline
7521 lxml.etree._ReadOnlyProxy.sourceline" class="py-name" href="#" onclick="return doclink('link-2481', 'sourceline', 'link-2462');">sourceline</a></tt> <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">event</tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> </tt>
7522 <a name="L2408"></a><tt class="py-lineno">2408</tt> <tt class="py-line"> <tt id="link-2482" class="py-name"><a title="lxml.etree.iterparse" class="py-name" href="#" onclick="return doclink('link-2482', 'iterparse', 'link-782');">iterparse</a></tt><tt class="py-op">(</tt><tt id="link-2483" class="py-name"><a title="lxml.tests.common_imports.fileInTestDir" class="py-name" href="#" onclick="return doclink('link-2483', 'fileInTestDir', 'link-12');">fileInTestDir</a></tt><tt class="py-op">(</tt><tt class="py-string">'include/test_xinclude.xml'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
7523 <a name="L2409"></a><tt class="py-lineno">2409</tt> <tt class="py-line"> <tt class="py-name">events</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-string">"start"</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-op">]</tt> </tt>
7524 <a name="L2410"></a><tt class="py-lineno">2410</tt> <tt class="py-line"> </tt>
7525 <a name="L2411"></a><tt class="py-lineno">2411</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7526 <a name="L2412"></a><tt class="py-lineno">2412</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-number">2</tt><tt class="py-op">,</tt> <tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
7527 <a name="L2413"></a><tt class="py-lineno">2413</tt> <tt class="py-line"> <tt class="py-name">lines</tt><tt class="py-op">)</tt> </tt>
7528 </div><a name="L2414"></a><tt class="py-lineno">2414</tt> <tt class="py-line"> </tt>
7529 <a name="ETreeOnlyTestCase.test_sourceline_element"></a><div id="ETreeOnlyTestCase.test_sourceline_element-def"><a name="L2415"></a><tt class="py-lineno">2415</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_sourceline_element-toggle" onclick="return toggle('ETreeOnlyTestCase.test_sourceline_element');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_sourceline_element">test_sourceline_element</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7530 </div><div id="ETreeOnlyTestCase.test_sourceline_element-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_sourceline_element-expanded"><a name="L2416"></a><tt class="py-lineno">2416</tt> <tt class="py-line"> <tt id="link-2484" class="py-name"><a title="lxml.cssselect.Element
7533 lxml.objectify.Element
7534 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7535 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2484', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2485" class="py-name"><a title="lxml.etree
7536 lxml.sax.ElementTreeContentHandler.etree
7537 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7538 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7539 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2485', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2486" class="py-name"><a title="lxml.cssselect.Element
7542 lxml.objectify.Element
7543 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7544 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2486', 'Element', 'link-69');">Element</a></tt> </tt>
7545 <a name="L2417"></a><tt class="py-lineno">2417</tt> <tt class="py-line"> <tt id="link-2487" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2487', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2488" class="py-name"><a title="lxml.etree
7546 lxml.sax.ElementTreeContentHandler.etree
7547 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7548 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7549 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2488', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2489" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2489', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
7550 <a name="L2418"></a><tt class="py-lineno">2418</tt> <tt class="py-line"> <tt class="py-name">el</tt> <tt class="py-op">=</tt> <tt id="link-2490" class="py-name"><a title="lxml.cssselect.Element
7553 lxml.objectify.Element
7554 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
7555 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2490', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">"test"</tt><tt class="py-op">)</tt> </tt>
7556 <a name="L2419"></a><tt class="py-lineno">2419</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-2491" class="py-name"><a title="lxml.etree._Element.sourceline
7557 lxml.etree._ReadOnlyProxy.sourceline" class="py-name" href="#" onclick="return doclink('link-2491', 'sourceline', 'link-2462');">sourceline</a></tt><tt class="py-op">)</tt> </tt>
7558 <a name="L2420"></a><tt class="py-lineno">2420</tt> <tt class="py-line"> </tt>
7559 <a name="L2421"></a><tt class="py-lineno">2421</tt> <tt class="py-line"> <tt class="py-name">child</tt> <tt class="py-op">=</tt> <tt id="link-2492" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2492', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">el</tt><tt class="py-op">,</tt> <tt class="py-string">"test"</tt><tt class="py-op">)</tt> </tt>
7560 <a name="L2422"></a><tt class="py-lineno">2422</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">el</tt><tt class="py-op">.</tt><tt id="link-2493" class="py-name"><a title="lxml.etree._Element.sourceline
7561 lxml.etree._ReadOnlyProxy.sourceline" class="py-name" href="#" onclick="return doclink('link-2493', 'sourceline', 'link-2462');">sourceline</a></tt><tt class="py-op">)</tt> </tt>
7562 <a name="L2423"></a><tt class="py-lineno">2423</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">child</tt><tt class="py-op">.</tt><tt id="link-2494" class="py-name"><a title="lxml.etree._Element.sourceline
7563 lxml.etree._ReadOnlyProxy.sourceline" class="py-name" href="#" onclick="return doclink('link-2494', 'sourceline', 'link-2462');">sourceline</a></tt><tt class="py-op">)</tt> </tt>
7564 </div><a name="L2424"></a><tt class="py-lineno">2424</tt> <tt class="py-line"> </tt>
7565 <a name="ETreeOnlyTestCase.test_XML_base_url_docinfo"></a><div id="ETreeOnlyTestCase.test_XML_base_url_docinfo-def"><a name="L2425"></a><tt class="py-lineno">2425</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_XML_base_url_docinfo-toggle" onclick="return toggle('ETreeOnlyTestCase.test_XML_base_url_docinfo');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_XML_base_url_docinfo">test_XML_base_url_docinfo</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7566 </div><div id="ETreeOnlyTestCase.test_XML_base_url_docinfo-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_XML_base_url_docinfo-expanded"><a name="L2426"></a><tt class="py-lineno">2426</tt> <tt class="py-line"> <tt id="link-2495" class="py-name"><a title="lxml.etree
7567 lxml.sax.ElementTreeContentHandler.etree
7568 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7569 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7570 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2495', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2496" class="py-name"><a title="lxml.etree
7571 lxml.sax.ElementTreeContentHandler.etree
7572 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7573 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7574 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2496', 'etree', 'link-10');">etree</a></tt> </tt>
7575 <a name="L2427"></a><tt class="py-lineno">2427</tt> <tt class="py-line"> <tt id="link-2497" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2497', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-2498" class="py-name"><a title="lxml.etree
7576 lxml.sax.ElementTreeContentHandler.etree
7577 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7578 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7579 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2498', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2499" class="py-name"><a title="lxml.etree.XML
7581 lxml.tests.test_objectify.ObjectifyTestCase.XML
7582 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2499', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-2500" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2500', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">"<root/>"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-2501" class="py-name"><a title="lxml.html.HtmlMixin.base_url" class="py-name" href="#" onclick="return doclink('link-2501', 'base_url', 'link-1269');">base_url</a></tt><tt class="py-op">=</tt><tt class="py-string">"http://no/such/url"</tt><tt class="py-op">)</tt> </tt>
7583 <a name="L2428"></a><tt class="py-lineno">2428</tt> <tt class="py-line"> <tt id="link-2502" class="py-name" targets="Variable lxml.etree._ElementTree.docinfo=lxml.etree._ElementTree-class.html#docinfo"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2502', 'docinfo', 'link-2502');">docinfo</a></tt> <tt class="py-op">=</tt> <tt id="link-2503" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2503', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-2504" class="py-name"><a title="lxml.etree._Element.getroottree" class="py-name" href="#" onclick="return doclink('link-2504', 'getroottree', 'link-1969');">getroottree</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-2505" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2505', 'docinfo', 'link-2502');">docinfo</a></tt> </tt>
7584 <a name="L2429"></a><tt class="py-lineno">2429</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2506" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2506', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2507" class="py-name" targets="Variable lxml.etree.DocInfo.URL=lxml.etree.DocInfo-class.html#URL"><a title="lxml.etree.DocInfo.URL" class="py-name" href="#" onclick="return doclink('link-2507', 'URL', 'link-2507');">URL</a></tt><tt class="py-op">,</tt> <tt class="py-string">"http://no/such/url"</tt><tt class="py-op">)</tt> </tt>
7585 </div><a name="L2430"></a><tt class="py-lineno">2430</tt> <tt class="py-line"> </tt>
7586 <a name="ETreeOnlyTestCase.test_XML_set_base_url_docinfo"></a><div id="ETreeOnlyTestCase.test_XML_set_base_url_docinfo-def"><a name="L2431"></a><tt class="py-lineno">2431</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_XML_set_base_url_docinfo-toggle" onclick="return toggle('ETreeOnlyTestCase.test_XML_set_base_url_docinfo');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_XML_set_base_url_docinfo">test_XML_set_base_url_docinfo</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7587 </div><div id="ETreeOnlyTestCase.test_XML_set_base_url_docinfo-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_XML_set_base_url_docinfo-expanded"><a name="L2432"></a><tt class="py-lineno">2432</tt> <tt class="py-line"> <tt id="link-2508" class="py-name"><a title="lxml.etree
7588 lxml.sax.ElementTreeContentHandler.etree
7589 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7590 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7591 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2508', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2509" class="py-name"><a title="lxml.etree
7592 lxml.sax.ElementTreeContentHandler.etree
7593 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7594 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7595 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2509', 'etree', 'link-10');">etree</a></tt> </tt>
7596 <a name="L2433"></a><tt class="py-lineno">2433</tt> <tt class="py-line"> <tt id="link-2510" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2510', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-2511" class="py-name"><a title="lxml.etree
7597 lxml.sax.ElementTreeContentHandler.etree
7598 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7599 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7600 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2511', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2512" class="py-name"><a title="lxml.etree.XML
7602 lxml.tests.test_objectify.ObjectifyTestCase.XML
7603 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2512', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-2513" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2513', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">"<root/>"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-2514" class="py-name"><a title="lxml.html.HtmlMixin.base_url" class="py-name" href="#" onclick="return doclink('link-2514', 'base_url', 'link-1269');">base_url</a></tt><tt class="py-op">=</tt><tt class="py-string">"http://no/such/url"</tt><tt class="py-op">)</tt> </tt>
7604 <a name="L2434"></a><tt class="py-lineno">2434</tt> <tt class="py-line"> <tt id="link-2515" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2515', 'docinfo', 'link-2502');">docinfo</a></tt> <tt class="py-op">=</tt> <tt id="link-2516" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2516', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-2517" class="py-name"><a title="lxml.etree._Element.getroottree" class="py-name" href="#" onclick="return doclink('link-2517', 'getroottree', 'link-1969');">getroottree</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-2518" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2518', 'docinfo', 'link-2502');">docinfo</a></tt> </tt>
7605 <a name="L2435"></a><tt class="py-lineno">2435</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2519" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2519', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2520" class="py-name"><a title="lxml.etree.DocInfo.URL" class="py-name" href="#" onclick="return doclink('link-2520', 'URL', 'link-2507');">URL</a></tt><tt class="py-op">,</tt> <tt class="py-string">"http://no/such/url"</tt><tt class="py-op">)</tt> </tt>
7606 <a name="L2436"></a><tt class="py-lineno">2436</tt> <tt class="py-line"> <tt id="link-2521" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2521', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2522" class="py-name"><a title="lxml.etree.DocInfo.URL" class="py-name" href="#" onclick="return doclink('link-2522', 'URL', 'link-2507');">URL</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"https://secret/url"</tt> </tt>
7607 <a name="L2437"></a><tt class="py-lineno">2437</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2523" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2523', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2524" class="py-name"><a title="lxml.etree.DocInfo.URL" class="py-name" href="#" onclick="return doclink('link-2524', 'URL', 'link-2507');">URL</a></tt><tt class="py-op">,</tt> <tt class="py-string">"https://secret/url"</tt><tt class="py-op">)</tt> </tt>
7608 </div><a name="L2438"></a><tt class="py-lineno">2438</tt> <tt class="py-line"> </tt>
7609 <a name="ETreeOnlyTestCase.test_parse_stringio_base_url"></a><div id="ETreeOnlyTestCase.test_parse_stringio_base_url-def"><a name="L2439"></a><tt class="py-lineno">2439</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_parse_stringio_base_url-toggle" onclick="return toggle('ETreeOnlyTestCase.test_parse_stringio_base_url');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parse_stringio_base_url">test_parse_stringio_base_url</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7610 </div><div id="ETreeOnlyTestCase.test_parse_stringio_base_url-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_parse_stringio_base_url-expanded"><a name="L2440"></a><tt class="py-lineno">2440</tt> <tt class="py-line"> <tt id="link-2525" class="py-name"><a title="lxml.etree
7611 lxml.sax.ElementTreeContentHandler.etree
7612 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7613 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7614 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2525', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2526" class="py-name"><a title="lxml.etree
7615 lxml.sax.ElementTreeContentHandler.etree
7616 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7617 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7618 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2526', 'etree', 'link-10');">etree</a></tt> </tt>
7619 <a name="L2441"></a><tt class="py-lineno">2441</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-2527" class="py-name"><a title="lxml.etree
7620 lxml.sax.ElementTreeContentHandler.etree
7621 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7622 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7623 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2527', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2528" class="py-name"><a title="lxml.cssselect.parse
7624 lxml.etree._ElementTree.parse
7626 lxml.html.ElementSoup.parse
7627 lxml.html.html5parser.parse
7629 lxml.html.soupparser.parse
7630 lxml.objectify.parse
7631 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-2528', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-string">"<root/>"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-2529" class="py-name"><a title="lxml.html.HtmlMixin.base_url" class="py-name" href="#" onclick="return doclink('link-2529', 'base_url', 'link-1269');">base_url</a></tt><tt class="py-op">=</tt><tt class="py-string">"http://no/such/url"</tt><tt class="py-op">)</tt> </tt>
7632 <a name="L2442"></a><tt class="py-lineno">2442</tt> <tt class="py-line"> <tt id="link-2530" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2530', 'docinfo', 'link-2502');">docinfo</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-2531" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2531', 'docinfo', 'link-2502');">docinfo</a></tt> </tt>
7633 <a name="L2443"></a><tt class="py-lineno">2443</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2532" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2532', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2533" class="py-name"><a title="lxml.etree.DocInfo.URL" class="py-name" href="#" onclick="return doclink('link-2533', 'URL', 'link-2507');">URL</a></tt><tt class="py-op">,</tt> <tt class="py-string">"http://no/such/url"</tt><tt class="py-op">)</tt> </tt>
7634 </div><a name="L2444"></a><tt class="py-lineno">2444</tt> <tt class="py-line"> </tt>
7635 <a name="ETreeOnlyTestCase.test_parse_base_url_docinfo"></a><div id="ETreeOnlyTestCase.test_parse_base_url_docinfo-def"><a name="L2445"></a><tt class="py-lineno">2445</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_parse_base_url_docinfo-toggle" onclick="return toggle('ETreeOnlyTestCase.test_parse_base_url_docinfo');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parse_base_url_docinfo">test_parse_base_url_docinfo</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7636 </div><div id="ETreeOnlyTestCase.test_parse_base_url_docinfo-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_parse_base_url_docinfo-expanded"><a name="L2446"></a><tt class="py-lineno">2446</tt> <tt class="py-line"> <tt id="link-2534" class="py-name"><a title="lxml.etree
7637 lxml.sax.ElementTreeContentHandler.etree
7638 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7639 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7640 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2534', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2535" class="py-name"><a title="lxml.etree
7641 lxml.sax.ElementTreeContentHandler.etree
7642 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7643 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7644 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2535', 'etree', 'link-10');">etree</a></tt> </tt>
7645 <a name="L2447"></a><tt class="py-lineno">2447</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-2536" class="py-name"><a title="lxml.etree
7646 lxml.sax.ElementTreeContentHandler.etree
7647 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7648 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7649 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2536', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2537" class="py-name"><a title="lxml.cssselect.parse
7650 lxml.etree._ElementTree.parse
7652 lxml.html.ElementSoup.parse
7653 lxml.html.html5parser.parse
7655 lxml.html.soupparser.parse
7656 lxml.objectify.parse
7657 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-2537', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt id="link-2538" class="py-name"><a title="lxml.tests.common_imports.fileInTestDir" class="py-name" href="#" onclick="return doclink('link-2538', 'fileInTestDir', 'link-12');">fileInTestDir</a></tt><tt class="py-op">(</tt><tt class="py-string">'include/test_xinclude.xml'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
7658 <a name="L2448"></a><tt class="py-lineno">2448</tt> <tt class="py-line"> <tt id="link-2539" class="py-name"><a title="lxml.html.HtmlMixin.base_url" class="py-name" href="#" onclick="return doclink('link-2539', 'base_url', 'link-1269');">base_url</a></tt><tt class="py-op">=</tt><tt class="py-string">"http://no/such/url"</tt><tt class="py-op">)</tt> </tt>
7659 <a name="L2449"></a><tt class="py-lineno">2449</tt> <tt class="py-line"> <tt id="link-2540" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2540', 'docinfo', 'link-2502');">docinfo</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-2541" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2541', 'docinfo', 'link-2502');">docinfo</a></tt> </tt>
7660 <a name="L2450"></a><tt class="py-lineno">2450</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2542" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2542', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2543" class="py-name"><a title="lxml.etree.DocInfo.URL" class="py-name" href="#" onclick="return doclink('link-2543', 'URL', 'link-2507');">URL</a></tt><tt class="py-op">,</tt> <tt class="py-string">"http://no/such/url"</tt><tt class="py-op">)</tt> </tt>
7661 </div><a name="L2451"></a><tt class="py-lineno">2451</tt> <tt class="py-line"> </tt>
7662 <a name="ETreeOnlyTestCase.test_HTML_base_url_docinfo"></a><div id="ETreeOnlyTestCase.test_HTML_base_url_docinfo-def"><a name="L2452"></a><tt class="py-lineno">2452</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_HTML_base_url_docinfo-toggle" onclick="return toggle('ETreeOnlyTestCase.test_HTML_base_url_docinfo');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_HTML_base_url_docinfo">test_HTML_base_url_docinfo</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7663 </div><div id="ETreeOnlyTestCase.test_HTML_base_url_docinfo-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_HTML_base_url_docinfo-expanded"><a name="L2453"></a><tt class="py-lineno">2453</tt> <tt class="py-line"> <tt id="link-2544" class="py-name"><a title="lxml.etree
7664 lxml.sax.ElementTreeContentHandler.etree
7665 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7666 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7667 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2544', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2545" class="py-name"><a title="lxml.etree
7668 lxml.sax.ElementTreeContentHandler.etree
7669 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7670 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7671 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2545', 'etree', 'link-10');">etree</a></tt> </tt>
7672 <a name="L2454"></a><tt class="py-lineno">2454</tt> <tt class="py-line"> <tt id="link-2546" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2546', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-2547" class="py-name"><a title="lxml.etree
7673 lxml.sax.ElementTreeContentHandler.etree
7674 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7675 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7676 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2547', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2548" class="py-name"><a title="lxml.etree.ErrorDomains.HTML
7678 lxml.html.builder.HTML" class="py-name" href="#" onclick="return doclink('link-2548', 'HTML', 'link-589');">HTML</a></tt><tt class="py-op">(</tt><tt id="link-2549" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2549', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">"<html/>"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-2550" class="py-name"><a title="lxml.html.HtmlMixin.base_url" class="py-name" href="#" onclick="return doclink('link-2550', 'base_url', 'link-1269');">base_url</a></tt><tt class="py-op">=</tt><tt class="py-string">"http://no/such/url"</tt><tt class="py-op">)</tt> </tt>
7679 <a name="L2455"></a><tt class="py-lineno">2455</tt> <tt class="py-line"> <tt id="link-2551" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2551', 'docinfo', 'link-2502');">docinfo</a></tt> <tt class="py-op">=</tt> <tt id="link-2552" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2552', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-2553" class="py-name"><a title="lxml.etree._Element.getroottree" class="py-name" href="#" onclick="return doclink('link-2553', 'getroottree', 'link-1969');">getroottree</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-2554" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2554', 'docinfo', 'link-2502');">docinfo</a></tt> </tt>
7680 <a name="L2456"></a><tt class="py-lineno">2456</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2555" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2555', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2556" class="py-name"><a title="lxml.etree.DocInfo.URL" class="py-name" href="#" onclick="return doclink('link-2556', 'URL', 'link-2507');">URL</a></tt><tt class="py-op">,</tt> <tt class="py-string">"http://no/such/url"</tt><tt class="py-op">)</tt> </tt>
7681 </div><a name="L2457"></a><tt class="py-lineno">2457</tt> <tt class="py-line"> </tt>
7682 <a name="ETreeOnlyTestCase.test_docinfo_public"></a><div id="ETreeOnlyTestCase.test_docinfo_public-def"><a name="L2458"></a><tt class="py-lineno">2458</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_docinfo_public-toggle" onclick="return toggle('ETreeOnlyTestCase.test_docinfo_public');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_docinfo_public">test_docinfo_public</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7683 </div><div id="ETreeOnlyTestCase.test_docinfo_public-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_docinfo_public-expanded"><a name="L2459"></a><tt class="py-lineno">2459</tt> <tt class="py-line"> <tt id="link-2557" class="py-name"><a title="lxml.etree
7684 lxml.sax.ElementTreeContentHandler.etree
7685 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7686 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7687 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2557', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2558" class="py-name"><a title="lxml.etree
7688 lxml.sax.ElementTreeContentHandler.etree
7689 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7690 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7691 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2558', 'etree', 'link-10');">etree</a></tt> </tt>
7692 <a name="L2460"></a><tt class="py-lineno">2460</tt> <tt class="py-line"> <tt class="py-name">xml_header</tt> <tt class="py-op">=</tt> <tt class="py-string">'<?xml version="1.0" encoding="ascii"?>'</tt> </tt>
7693 <a name="L2461"></a><tt class="py-lineno">2461</tt> <tt class="py-line"> <tt class="py-name">pub_id</tt> <tt class="py-op">=</tt> <tt class="py-string">"-//W3C//DTD XHTML 1.0 Transitional//EN"</tt> </tt>
7694 <a name="L2462"></a><tt class="py-lineno">2462</tt> <tt class="py-line"> <tt class="py-name">sys_id</tt> <tt class="py-op">=</tt> <tt class="py-string">"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</tt> </tt>
7695 <a name="L2463"></a><tt class="py-lineno">2463</tt> <tt class="py-line"> <tt class="py-name">doctype_string</tt> <tt class="py-op">=</tt> <tt class="py-string">'<!DOCTYPE html PUBLIC "%s" "%s">'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">pub_id</tt><tt class="py-op">,</tt> <tt class="py-name">sys_id</tt><tt class="py-op">)</tt> </tt>
7696 <a name="L2464"></a><tt class="py-lineno">2464</tt> <tt class="py-line"> </tt>
7697 <a name="L2465"></a><tt class="py-lineno">2465</tt> <tt class="py-line"> <tt id="link-2559" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-2559', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-2560" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2560', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-name">xml_header</tt> <tt class="py-op">+</tt> <tt class="py-name">doctype_string</tt> <tt class="py-op">+</tt> <tt class="py-string">'<html><body></body></html>'</tt><tt class="py-op">)</tt> </tt>
7698 <a name="L2466"></a><tt class="py-lineno">2466</tt> <tt class="py-line"> </tt>
7699 <a name="L2467"></a><tt class="py-lineno">2467</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-2561" class="py-name"><a title="lxml.etree
7700 lxml.sax.ElementTreeContentHandler.etree
7701 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7702 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7703 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2561', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2562" class="py-name"><a title="lxml.cssselect.parse
7704 lxml.etree._ElementTree.parse
7706 lxml.html.ElementSoup.parse
7707 lxml.html.html5parser.parse
7709 lxml.html.soupparser.parse
7710 lxml.objectify.parse
7711 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-2562', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt id="link-2563" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-2563', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
7712 <a name="L2468"></a><tt class="py-lineno">2468</tt> <tt class="py-line"> <tt id="link-2564" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2564', 'docinfo', 'link-2502');">docinfo</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-2565" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2565', 'docinfo', 'link-2502');">docinfo</a></tt> </tt>
7713 <a name="L2469"></a><tt class="py-lineno">2469</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2566" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2566', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2567" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-2567', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">,</tt> <tt class="py-string">"ascii"</tt><tt class="py-op">)</tt> </tt>
7714 <a name="L2470"></a><tt class="py-lineno">2470</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2568" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2568', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2569" class="py-name" targets="Variable lxml.etree.DocInfo.xml_version=lxml.etree.DocInfo-class.html#xml_version"><a title="lxml.etree.DocInfo.xml_version" class="py-name" href="#" onclick="return doclink('link-2569', 'xml_version', 'link-2569');">xml_version</a></tt><tt class="py-op">,</tt> <tt class="py-string">"1.0"</tt><tt class="py-op">)</tt> </tt>
7715 <a name="L2471"></a><tt class="py-lineno">2471</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2570" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2570', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2571" class="py-name" targets="Variable lxml.etree.DocInfo.public_id=lxml.etree.DocInfo-class.html#public_id"><a title="lxml.etree.DocInfo.public_id" class="py-name" href="#" onclick="return doclink('link-2571', 'public_id', 'link-2571');">public_id</a></tt><tt class="py-op">,</tt> <tt class="py-name">pub_id</tt><tt class="py-op">)</tt> </tt>
7716 <a name="L2472"></a><tt class="py-lineno">2472</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2572" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2572', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2573" class="py-name" targets="Variable lxml.etree.DocInfo.system_url=lxml.etree.DocInfo-class.html#system_url"><a title="lxml.etree.DocInfo.system_url" class="py-name" href="#" onclick="return doclink('link-2573', 'system_url', 'link-2573');">system_url</a></tt><tt class="py-op">,</tt> <tt class="py-name">sys_id</tt><tt class="py-op">)</tt> </tt>
7717 <a name="L2473"></a><tt class="py-lineno">2473</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2574" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2574', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2575" class="py-name" targets="Variable lxml.etree.DocInfo.root_name=lxml.etree.DocInfo-class.html#root_name"><a title="lxml.etree.DocInfo.root_name" class="py-name" href="#" onclick="return doclink('link-2575', 'root_name', 'link-2575');">root_name</a></tt><tt class="py-op">,</tt> <tt class="py-string">'html'</tt><tt class="py-op">)</tt> </tt>
7718 <a name="L2474"></a><tt class="py-lineno">2474</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2576" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2576', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2577" class="py-name" targets="Variable lxml.etree.DocInfo.doctype=lxml.etree.DocInfo-class.html#doctype"><a title="lxml.etree.DocInfo.doctype" class="py-name" href="#" onclick="return doclink('link-2577', 'doctype', 'link-2577');">doctype</a></tt><tt class="py-op">,</tt> <tt class="py-name">doctype_string</tt><tt class="py-op">)</tt> </tt>
7719 </div><a name="L2475"></a><tt class="py-lineno">2475</tt> <tt class="py-line"> </tt>
7720 <a name="ETreeOnlyTestCase.test_docinfo_system"></a><div id="ETreeOnlyTestCase.test_docinfo_system-def"><a name="L2476"></a><tt class="py-lineno">2476</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_docinfo_system-toggle" onclick="return toggle('ETreeOnlyTestCase.test_docinfo_system');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_docinfo_system">test_docinfo_system</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7721 </div><div id="ETreeOnlyTestCase.test_docinfo_system-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_docinfo_system-expanded"><a name="L2477"></a><tt class="py-lineno">2477</tt> <tt class="py-line"> <tt id="link-2578" class="py-name"><a title="lxml.etree
7722 lxml.sax.ElementTreeContentHandler.etree
7723 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7724 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7725 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2578', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2579" class="py-name"><a title="lxml.etree
7726 lxml.sax.ElementTreeContentHandler.etree
7727 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7728 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7729 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2579', 'etree', 'link-10');">etree</a></tt> </tt>
7730 <a name="L2478"></a><tt class="py-lineno">2478</tt> <tt class="py-line"> <tt class="py-name">xml_header</tt> <tt class="py-op">=</tt> <tt class="py-string">'<?xml version="1.0" encoding="UTF-8"?>'</tt> </tt>
7731 <a name="L2479"></a><tt class="py-lineno">2479</tt> <tt class="py-line"> <tt class="py-name">sys_id</tt> <tt class="py-op">=</tt> <tt class="py-string">"some.dtd"</tt> </tt>
7732 <a name="L2480"></a><tt class="py-lineno">2480</tt> <tt class="py-line"> <tt class="py-name">doctype_string</tt> <tt class="py-op">=</tt> <tt class="py-string">'<!DOCTYPE html SYSTEM "%s">'</tt> <tt class="py-op">%</tt> <tt class="py-name">sys_id</tt> </tt>
7733 <a name="L2481"></a><tt class="py-lineno">2481</tt> <tt class="py-line"> <tt id="link-2580" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-2580', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-2581" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2581', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-name">xml_header</tt> <tt class="py-op">+</tt> <tt class="py-name">doctype_string</tt> <tt class="py-op">+</tt> <tt class="py-string">'<html><body></body></html>'</tt><tt class="py-op">)</tt> </tt>
7734 <a name="L2482"></a><tt class="py-lineno">2482</tt> <tt class="py-line"> </tt>
7735 <a name="L2483"></a><tt class="py-lineno">2483</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-2582" class="py-name"><a title="lxml.etree
7736 lxml.sax.ElementTreeContentHandler.etree
7737 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7738 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7739 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2582', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2583" class="py-name"><a title="lxml.cssselect.parse
7740 lxml.etree._ElementTree.parse
7742 lxml.html.ElementSoup.parse
7743 lxml.html.html5parser.parse
7745 lxml.html.soupparser.parse
7746 lxml.objectify.parse
7747 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-2583', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt id="link-2584" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-2584', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
7748 <a name="L2484"></a><tt class="py-lineno">2484</tt> <tt class="py-line"> <tt id="link-2585" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2585', 'docinfo', 'link-2502');">docinfo</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-2586" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2586', 'docinfo', 'link-2502');">docinfo</a></tt> </tt>
7749 <a name="L2485"></a><tt class="py-lineno">2485</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2587" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2587', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2588" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-2588', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">,</tt> <tt class="py-string">"UTF-8"</tt><tt class="py-op">)</tt> </tt>
7750 <a name="L2486"></a><tt class="py-lineno">2486</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2589" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2589', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2590" class="py-name"><a title="lxml.etree.DocInfo.xml_version" class="py-name" href="#" onclick="return doclink('link-2590', 'xml_version', 'link-2569');">xml_version</a></tt><tt class="py-op">,</tt> <tt class="py-string">"1.0"</tt><tt class="py-op">)</tt> </tt>
7751 <a name="L2487"></a><tt class="py-lineno">2487</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2591" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2591', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2592" class="py-name"><a title="lxml.etree.DocInfo.public_id" class="py-name" href="#" onclick="return doclink('link-2592', 'public_id', 'link-2571');">public_id</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
7752 <a name="L2488"></a><tt class="py-lineno">2488</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2593" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2593', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2594" class="py-name"><a title="lxml.etree.DocInfo.system_url" class="py-name" href="#" onclick="return doclink('link-2594', 'system_url', 'link-2573');">system_url</a></tt><tt class="py-op">,</tt> <tt class="py-name">sys_id</tt><tt class="py-op">)</tt> </tt>
7753 <a name="L2489"></a><tt class="py-lineno">2489</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2595" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2595', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2596" class="py-name"><a title="lxml.etree.DocInfo.root_name" class="py-name" href="#" onclick="return doclink('link-2596', 'root_name', 'link-2575');">root_name</a></tt><tt class="py-op">,</tt> <tt class="py-string">'html'</tt><tt class="py-op">)</tt> </tt>
7754 <a name="L2490"></a><tt class="py-lineno">2490</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2597" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2597', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2598" class="py-name"><a title="lxml.etree.DocInfo.doctype" class="py-name" href="#" onclick="return doclink('link-2598', 'doctype', 'link-2577');">doctype</a></tt><tt class="py-op">,</tt> <tt class="py-name">doctype_string</tt><tt class="py-op">)</tt> </tt>
7755 </div><a name="L2491"></a><tt class="py-lineno">2491</tt> <tt class="py-line"> </tt>
7756 <a name="ETreeOnlyTestCase.test_docinfo_empty"></a><div id="ETreeOnlyTestCase.test_docinfo_empty-def"><a name="L2492"></a><tt class="py-lineno">2492</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_docinfo_empty-toggle" onclick="return toggle('ETreeOnlyTestCase.test_docinfo_empty');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_docinfo_empty">test_docinfo_empty</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7757 </div><div id="ETreeOnlyTestCase.test_docinfo_empty-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_docinfo_empty-expanded"><a name="L2493"></a><tt class="py-lineno">2493</tt> <tt class="py-line"> <tt id="link-2599" class="py-name"><a title="lxml.etree
7758 lxml.sax.ElementTreeContentHandler.etree
7759 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7760 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7761 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2599', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2600" class="py-name"><a title="lxml.etree
7762 lxml.sax.ElementTreeContentHandler.etree
7763 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7764 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7765 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2600', 'etree', 'link-10');">etree</a></tt> </tt>
7766 <a name="L2494"></a><tt class="py-lineno">2494</tt> <tt class="py-line"> <tt id="link-2601" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-2601', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-2602" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2602', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<html><body></body></html>'</tt><tt class="py-op">)</tt> </tt>
7767 <a name="L2495"></a><tt class="py-lineno">2495</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-2603" class="py-name"><a title="lxml.etree
7768 lxml.sax.ElementTreeContentHandler.etree
7769 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7770 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7771 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2603', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2604" class="py-name"><a title="lxml.cssselect.parse
7772 lxml.etree._ElementTree.parse
7774 lxml.html.ElementSoup.parse
7775 lxml.html.html5parser.parse
7777 lxml.html.soupparser.parse
7778 lxml.objectify.parse
7779 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-2604', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt id="link-2605" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-2605', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
7780 <a name="L2496"></a><tt class="py-lineno">2496</tt> <tt class="py-line"> <tt id="link-2606" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2606', 'docinfo', 'link-2502');">docinfo</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-2607" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2607', 'docinfo', 'link-2502');">docinfo</a></tt> </tt>
7781 <a name="L2497"></a><tt class="py-lineno">2497</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2608" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2608', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2609" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-2609', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">,</tt> <tt class="py-string">"UTF-8"</tt><tt class="py-op">)</tt> </tt>
7782 <a name="L2498"></a><tt class="py-lineno">2498</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2610" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2610', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2611" class="py-name"><a title="lxml.etree.DocInfo.xml_version" class="py-name" href="#" onclick="return doclink('link-2611', 'xml_version', 'link-2569');">xml_version</a></tt><tt class="py-op">,</tt> <tt class="py-string">"1.0"</tt><tt class="py-op">)</tt> </tt>
7783 <a name="L2499"></a><tt class="py-lineno">2499</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2612" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2612', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2613" class="py-name"><a title="lxml.etree.DocInfo.public_id" class="py-name" href="#" onclick="return doclink('link-2613', 'public_id', 'link-2571');">public_id</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
7784 <a name="L2500"></a><tt class="py-lineno">2500</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2614" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2614', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2615" class="py-name"><a title="lxml.etree.DocInfo.system_url" class="py-name" href="#" onclick="return doclink('link-2615', 'system_url', 'link-2573');">system_url</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
7785 <a name="L2501"></a><tt class="py-lineno">2501</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2616" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2616', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2617" class="py-name"><a title="lxml.etree.DocInfo.root_name" class="py-name" href="#" onclick="return doclink('link-2617', 'root_name', 'link-2575');">root_name</a></tt><tt class="py-op">,</tt> <tt class="py-string">'html'</tt><tt class="py-op">)</tt> </tt>
7786 <a name="L2502"></a><tt class="py-lineno">2502</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2618" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2618', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2619" class="py-name"><a title="lxml.etree.DocInfo.doctype" class="py-name" href="#" onclick="return doclink('link-2619', 'doctype', 'link-2577');">doctype</a></tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
7787 </div><a name="L2503"></a><tt class="py-lineno">2503</tt> <tt class="py-line"> </tt>
7788 <a name="ETreeOnlyTestCase.test_docinfo_name_only"></a><div id="ETreeOnlyTestCase.test_docinfo_name_only-def"><a name="L2504"></a><tt class="py-lineno">2504</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_docinfo_name_only-toggle" onclick="return toggle('ETreeOnlyTestCase.test_docinfo_name_only');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_docinfo_name_only">test_docinfo_name_only</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7789 </div><div id="ETreeOnlyTestCase.test_docinfo_name_only-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_docinfo_name_only-expanded"><a name="L2505"></a><tt class="py-lineno">2505</tt> <tt class="py-line"> <tt id="link-2620" class="py-name"><a title="lxml.etree
7790 lxml.sax.ElementTreeContentHandler.etree
7791 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7792 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7793 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2620', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2621" class="py-name"><a title="lxml.etree
7794 lxml.sax.ElementTreeContentHandler.etree
7795 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7796 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7797 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2621', 'etree', 'link-10');">etree</a></tt> </tt>
7798 <a name="L2506"></a><tt class="py-lineno">2506</tt> <tt class="py-line"> <tt id="link-2622" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-2622', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-2623" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2623', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!DOCTYPE root><root></root>'</tt><tt class="py-op">)</tt> </tt>
7799 <a name="L2507"></a><tt class="py-lineno">2507</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-2624" class="py-name"><a title="lxml.etree
7800 lxml.sax.ElementTreeContentHandler.etree
7801 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7802 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7803 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2624', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2625" class="py-name"><a title="lxml.cssselect.parse
7804 lxml.etree._ElementTree.parse
7806 lxml.html.ElementSoup.parse
7807 lxml.html.html5parser.parse
7809 lxml.html.soupparser.parse
7810 lxml.objectify.parse
7811 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-2625', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt id="link-2626" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-2626', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
7812 <a name="L2508"></a><tt class="py-lineno">2508</tt> <tt class="py-line"> <tt id="link-2627" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2627', 'docinfo', 'link-2502');">docinfo</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-2628" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2628', 'docinfo', 'link-2502');">docinfo</a></tt> </tt>
7813 <a name="L2509"></a><tt class="py-lineno">2509</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2629" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2629', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2630" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-2630', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">,</tt> <tt class="py-string">"UTF-8"</tt><tt class="py-op">)</tt> </tt>
7814 <a name="L2510"></a><tt class="py-lineno">2510</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2631" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2631', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2632" class="py-name"><a title="lxml.etree.DocInfo.xml_version" class="py-name" href="#" onclick="return doclink('link-2632', 'xml_version', 'link-2569');">xml_version</a></tt><tt class="py-op">,</tt> <tt class="py-string">"1.0"</tt><tt class="py-op">)</tt> </tt>
7815 <a name="L2511"></a><tt class="py-lineno">2511</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2633" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2633', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2634" class="py-name"><a title="lxml.etree.DocInfo.public_id" class="py-name" href="#" onclick="return doclink('link-2634', 'public_id', 'link-2571');">public_id</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
7816 <a name="L2512"></a><tt class="py-lineno">2512</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2635" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2635', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2636" class="py-name"><a title="lxml.etree.DocInfo.system_url" class="py-name" href="#" onclick="return doclink('link-2636', 'system_url', 'link-2573');">system_url</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
7817 <a name="L2513"></a><tt class="py-lineno">2513</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2637" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2637', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2638" class="py-name"><a title="lxml.etree.DocInfo.root_name" class="py-name" href="#" onclick="return doclink('link-2638', 'root_name', 'link-2575');">root_name</a></tt><tt class="py-op">,</tt> <tt class="py-string">'root'</tt><tt class="py-op">)</tt> </tt>
7818 <a name="L2514"></a><tt class="py-lineno">2514</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2639" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2639', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2640" class="py-name"><a title="lxml.etree.DocInfo.doctype" class="py-name" href="#" onclick="return doclink('link-2640', 'doctype', 'link-2577');">doctype</a></tt><tt class="py-op">,</tt> <tt class="py-string">'<!DOCTYPE root>'</tt><tt class="py-op">)</tt> </tt>
7819 </div><a name="L2515"></a><tt class="py-lineno">2515</tt> <tt class="py-line"> </tt>
7820 <a name="ETreeOnlyTestCase.test_doctype_name_only_roundtrip"></a><div id="ETreeOnlyTestCase.test_doctype_name_only_roundtrip-def"><a name="L2516"></a><tt class="py-lineno">2516</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_doctype_name_only_roundtrip-toggle" onclick="return toggle('ETreeOnlyTestCase.test_doctype_name_only_roundtrip');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_doctype_name_only_roundtrip">test_doctype_name_only_roundtrip</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7821 </div><div id="ETreeOnlyTestCase.test_doctype_name_only_roundtrip-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_doctype_name_only_roundtrip-expanded"><a name="L2517"></a><tt class="py-lineno">2517</tt> <tt class="py-line"> <tt id="link-2641" class="py-name"><a title="lxml.etree
7822 lxml.sax.ElementTreeContentHandler.etree
7823 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7824 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7825 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2641', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2642" class="py-name"><a title="lxml.etree
7826 lxml.sax.ElementTreeContentHandler.etree
7827 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7828 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7829 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2642', 'etree', 'link-10');">etree</a></tt> </tt>
7830 <a name="L2518"></a><tt class="py-lineno">2518</tt> <tt class="py-line"> <tt id="link-2643" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-2643', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-2644" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2644', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!DOCTYPE root>\n<root/>'</tt><tt class="py-op">)</tt> </tt>
7831 <a name="L2519"></a><tt class="py-lineno">2519</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-2645" class="py-name"><a title="lxml.etree
7832 lxml.sax.ElementTreeContentHandler.etree
7833 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7834 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7835 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2645', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2646" class="py-name"><a title="lxml.cssselect.parse
7836 lxml.etree._ElementTree.parse
7838 lxml.html.ElementSoup.parse
7839 lxml.html.html5parser.parse
7841 lxml.html.soupparser.parse
7842 lxml.objectify.parse
7843 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-2646', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt id="link-2647" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-2647', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
7844 <a name="L2520"></a><tt class="py-lineno">2520</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2648" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-2648', 'xml', 'link-256');">xml</a></tt><tt class="py-op">,</tt> <tt id="link-2649" class="py-name"><a title="lxml.etree
7845 lxml.sax.ElementTreeContentHandler.etree
7846 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7847 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7848 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2649', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2650" class="py-name"><a title="lxml.etree.XSLT.tostring
7850 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2650', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
7851 </div><a name="L2521"></a><tt class="py-lineno">2521</tt> <tt class="py-line"> </tt>
7852 <a name="ETreeOnlyTestCase.test_doctype_output_override"></a><div id="ETreeOnlyTestCase.test_doctype_output_override-def"><a name="L2522"></a><tt class="py-lineno">2522</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_doctype_output_override-toggle" onclick="return toggle('ETreeOnlyTestCase.test_doctype_output_override');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_doctype_output_override">test_doctype_output_override</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7853 </div><div id="ETreeOnlyTestCase.test_doctype_output_override-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_doctype_output_override-expanded"><a name="L2523"></a><tt class="py-lineno">2523</tt> <tt class="py-line"> <tt id="link-2651" class="py-name"><a title="lxml.etree
7854 lxml.sax.ElementTreeContentHandler.etree
7855 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7856 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7857 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2651', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2652" class="py-name"><a title="lxml.etree
7858 lxml.sax.ElementTreeContentHandler.etree
7859 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7860 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7861 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2652', 'etree', 'link-10');">etree</a></tt> </tt>
7862 <a name="L2524"></a><tt class="py-lineno">2524</tt> <tt class="py-line"> <tt class="py-name">pub_id</tt> <tt class="py-op">=</tt> <tt class="py-string">"-//W3C//DTD XHTML 1.0 Transitional//EN"</tt> </tt>
7863 <a name="L2525"></a><tt class="py-lineno">2525</tt> <tt class="py-line"> <tt class="py-name">sys_id</tt> <tt class="py-op">=</tt> <tt class="py-string">"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</tt> </tt>
7864 <a name="L2526"></a><tt class="py-lineno">2526</tt> <tt class="py-line"> <tt class="py-name">doctype_string</tt> <tt class="py-op">=</tt> <tt id="link-2653" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2653', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!DOCTYPE html PUBLIC "%s" "%s">'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">pub_id</tt><tt class="py-op">,</tt> <tt class="py-name">sys_id</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
7865 <a name="L2527"></a><tt class="py-lineno">2527</tt> <tt class="py-line"> </tt>
7866 <a name="L2528"></a><tt class="py-lineno">2528</tt> <tt class="py-line"> <tt id="link-2654" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-2654', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-2655" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2655', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!DOCTYPE root>\n<root/>'</tt><tt class="py-op">)</tt> </tt>
7867 <a name="L2529"></a><tt class="py-lineno">2529</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-2656" class="py-name"><a title="lxml.etree
7868 lxml.sax.ElementTreeContentHandler.etree
7869 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7870 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7871 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2656', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2657" class="py-name"><a title="lxml.cssselect.parse
7872 lxml.etree._ElementTree.parse
7874 lxml.html.ElementSoup.parse
7875 lxml.html.html5parser.parse
7877 lxml.html.soupparser.parse
7878 lxml.objectify.parse
7879 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-2657', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt id="link-2658" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-2658', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
7880 <a name="L2530"></a><tt class="py-lineno">2530</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2659" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-2659', 'xml', 'link-256');">xml</a></tt><tt class="py-op">.</tt><tt id="link-2660" class="py-name"><a title="lxml.etree._Element.replace
7881 lxml.etree._ExsltRegExp.replace" class="py-name" href="#" onclick="return doclink('link-2660', 'replace', 'link-539');">replace</a></tt><tt class="py-op">(</tt><tt id="link-2661" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2661', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!DOCTYPE root>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">doctype_string</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
7882 <a name="L2531"></a><tt class="py-lineno">2531</tt> <tt class="py-line"> <tt id="link-2662" class="py-name"><a title="lxml.etree
7883 lxml.sax.ElementTreeContentHandler.etree
7884 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7885 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7886 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2662', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2663" class="py-name"><a title="lxml.etree.XSLT.tostring
7888 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2663', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">,</tt> <tt id="link-2664" class="py-name"><a title="lxml.etree.DocInfo.doctype" class="py-name" href="#" onclick="return doclink('link-2664', 'doctype', 'link-2577');">doctype</a></tt><tt class="py-op">=</tt><tt class="py-name">doctype_string</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
7889 </div><a name="L2532"></a><tt class="py-lineno">2532</tt> <tt class="py-line"> </tt>
7890 <a name="ETreeOnlyTestCase.test_xml_base"></a><div id="ETreeOnlyTestCase.test_xml_base-def"><a name="L2533"></a><tt class="py-lineno">2533</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_xml_base-toggle" onclick="return toggle('ETreeOnlyTestCase.test_xml_base');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_xml_base">test_xml_base</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7891 </div><div id="ETreeOnlyTestCase.test_xml_base-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_xml_base-expanded"><a name="L2534"></a><tt class="py-lineno">2534</tt> <tt class="py-line"> <tt id="link-2665" class="py-name"><a title="lxml.etree
7892 lxml.sax.ElementTreeContentHandler.etree
7893 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7894 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7895 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2665', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2666" class="py-name"><a title="lxml.etree
7896 lxml.sax.ElementTreeContentHandler.etree
7897 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7898 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7899 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2666', 'etree', 'link-10');">etree</a></tt> </tt>
7900 <a name="L2535"></a><tt class="py-lineno">2535</tt> <tt class="py-line"> <tt id="link-2667" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2667', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-2668" class="py-name"><a title="lxml.etree
7901 lxml.sax.ElementTreeContentHandler.etree
7902 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7903 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7904 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2668', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2669" class="py-name"><a title="lxml.etree.XML
7906 lxml.tests.test_objectify.ObjectifyTestCase.XML
7907 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2669', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-2670" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2670', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">"<root/>"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-2671" class="py-name"><a title="lxml.html.HtmlMixin.base_url" class="py-name" href="#" onclick="return doclink('link-2671', 'base_url', 'link-1269');">base_url</a></tt><tt class="py-op">=</tt><tt class="py-string">"http://no/such/url"</tt><tt class="py-op">)</tt> </tt>
7908 <a name="L2536"></a><tt class="py-lineno">2536</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2672" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2672', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-2673" class="py-name" targets="Variable lxml.etree._Element.base=lxml.etree._Element-class.html#base"><a title="lxml.etree._Element.base" class="py-name" href="#" onclick="return doclink('link-2673', 'base', 'link-2673');">base</a></tt><tt class="py-op">,</tt> <tt class="py-string">"http://no/such/url"</tt><tt class="py-op">)</tt> </tt>
7909 <a name="L2537"></a><tt class="py-lineno">2537</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7910 <a name="L2538"></a><tt class="py-lineno">2538</tt> <tt class="py-line"> <tt id="link-2674" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2674', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-2675" class="py-name"><a title="lxml.etree._Attrib.get
7911 lxml.etree._Element.get
7912 lxml.etree._IDDict.get
7913 lxml.etree._ProcessingInstruction.get
7914 lxml.etree._ReadOnlyElementProxy.get
7915 lxml.etree.__ContentOnlyElement.get" class="py-name" href="#" onclick="return doclink('link-2675', 'get', 'link-243');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'{http://www.w3.org/XML/1998/namespace}base'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
7916 <a name="L2539"></a><tt class="py-lineno">2539</tt> <tt class="py-line"> <tt id="link-2676" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2676', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-2677" class="py-name"><a title="lxml.etree._Element.base" class="py-name" href="#" onclick="return doclink('link-2677', 'base', 'link-2673');">base</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"https://secret/url"</tt> </tt>
7917 <a name="L2540"></a><tt class="py-lineno">2540</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2678" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2678', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-2679" class="py-name"><a title="lxml.etree._Element.base" class="py-name" href="#" onclick="return doclink('link-2679', 'base', 'link-2673');">base</a></tt><tt class="py-op">,</tt> <tt class="py-string">"https://secret/url"</tt><tt class="py-op">)</tt> </tt>
7918 <a name="L2541"></a><tt class="py-lineno">2541</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7919 <a name="L2542"></a><tt class="py-lineno">2542</tt> <tt class="py-line"> <tt id="link-2680" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2680', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-2681" class="py-name"><a title="lxml.etree._Attrib.get
7920 lxml.etree._Element.get
7921 lxml.etree._IDDict.get
7922 lxml.etree._ProcessingInstruction.get
7923 lxml.etree._ReadOnlyElementProxy.get
7924 lxml.etree.__ContentOnlyElement.get" class="py-name" href="#" onclick="return doclink('link-2681', 'get', 'link-243');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'{http://www.w3.org/XML/1998/namespace}base'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
7925 <a name="L2543"></a><tt class="py-lineno">2543</tt> <tt class="py-line"> <tt class="py-string">"https://secret/url"</tt><tt class="py-op">)</tt> </tt>
7926 </div><a name="L2544"></a><tt class="py-lineno">2544</tt> <tt class="py-line"> </tt>
7927 <a name="ETreeOnlyTestCase.test_xml_base_attribute"></a><div id="ETreeOnlyTestCase.test_xml_base_attribute-def"><a name="L2545"></a><tt class="py-lineno">2545</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_xml_base_attribute-toggle" onclick="return toggle('ETreeOnlyTestCase.test_xml_base_attribute');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_xml_base_attribute">test_xml_base_attribute</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7928 </div><div id="ETreeOnlyTestCase.test_xml_base_attribute-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_xml_base_attribute-expanded"><a name="L2546"></a><tt class="py-lineno">2546</tt> <tt class="py-line"> <tt id="link-2682" class="py-name"><a title="lxml.etree
7929 lxml.sax.ElementTreeContentHandler.etree
7930 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7931 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7932 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2682', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2683" class="py-name"><a title="lxml.etree
7933 lxml.sax.ElementTreeContentHandler.etree
7934 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7935 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7936 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2683', 'etree', 'link-10');">etree</a></tt> </tt>
7937 <a name="L2547"></a><tt class="py-lineno">2547</tt> <tt class="py-line"> <tt id="link-2684" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2684', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-2685" class="py-name"><a title="lxml.etree
7938 lxml.sax.ElementTreeContentHandler.etree
7939 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7940 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7941 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2685', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2686" class="py-name"><a title="lxml.etree.XML
7943 lxml.tests.test_objectify.ObjectifyTestCase.XML
7944 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2686', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-2687" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2687', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">"<root/>"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-2688" class="py-name"><a title="lxml.html.HtmlMixin.base_url" class="py-name" href="#" onclick="return doclink('link-2688', 'base_url', 'link-1269');">base_url</a></tt><tt class="py-op">=</tt><tt class="py-string">"http://no/such/url"</tt><tt class="py-op">)</tt> </tt>
7945 <a name="L2548"></a><tt class="py-lineno">2548</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2689" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2689', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-2690" class="py-name"><a title="lxml.etree._Element.base" class="py-name" href="#" onclick="return doclink('link-2690', 'base', 'link-2673');">base</a></tt><tt class="py-op">,</tt> <tt class="py-string">"http://no/such/url"</tt><tt class="py-op">)</tt> </tt>
7946 <a name="L2549"></a><tt class="py-lineno">2549</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7947 <a name="L2550"></a><tt class="py-lineno">2550</tt> <tt class="py-line"> <tt id="link-2691" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2691', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-2692" class="py-name"><a title="lxml.etree._Attrib.get
7948 lxml.etree._Element.get
7949 lxml.etree._IDDict.get
7950 lxml.etree._ProcessingInstruction.get
7951 lxml.etree._ReadOnlyElementProxy.get
7952 lxml.etree.__ContentOnlyElement.get" class="py-name" href="#" onclick="return doclink('link-2692', 'get', 'link-243');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'{http://www.w3.org/XML/1998/namespace}base'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
7953 <a name="L2551"></a><tt class="py-lineno">2551</tt> <tt class="py-line"> <tt id="link-2693" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2693', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-2694" class="py-name"><a title="lxml.etree._Element.set
7954 lxml.etree._XSLTProcessingInstruction.set
7955 lxml.etree.__ContentOnlyElement.set" class="py-name" href="#" onclick="return doclink('link-2694', 'set', 'link-241');">set</a></tt><tt class="py-op">(</tt><tt class="py-string">'{http://www.w3.org/XML/1998/namespace}base'</tt><tt class="py-op">,</tt> </tt>
7956 <a name="L2552"></a><tt class="py-lineno">2552</tt> <tt class="py-line"> <tt class="py-string">"https://secret/url"</tt><tt class="py-op">)</tt> </tt>
7957 <a name="L2553"></a><tt class="py-lineno">2553</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2695" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2695', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-2696" class="py-name"><a title="lxml.etree._Element.base" class="py-name" href="#" onclick="return doclink('link-2696', 'base', 'link-2673');">base</a></tt><tt class="py-op">,</tt> <tt class="py-string">"https://secret/url"</tt><tt class="py-op">)</tt> </tt>
7958 <a name="L2554"></a><tt class="py-lineno">2554</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
7959 <a name="L2555"></a><tt class="py-lineno">2555</tt> <tt class="py-line"> <tt id="link-2697" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2697', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-2698" class="py-name"><a title="lxml.etree._Attrib.get
7960 lxml.etree._Element.get
7961 lxml.etree._IDDict.get
7962 lxml.etree._ProcessingInstruction.get
7963 lxml.etree._ReadOnlyElementProxy.get
7964 lxml.etree.__ContentOnlyElement.get" class="py-name" href="#" onclick="return doclink('link-2698', 'get', 'link-243');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'{http://www.w3.org/XML/1998/namespace}base'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
7965 <a name="L2556"></a><tt class="py-lineno">2556</tt> <tt class="py-line"> <tt class="py-string">"https://secret/url"</tt><tt class="py-op">)</tt> </tt>
7966 </div><a name="L2557"></a><tt class="py-lineno">2557</tt> <tt class="py-line"> </tt>
7967 <a name="ETreeOnlyTestCase.test_html_base"></a><div id="ETreeOnlyTestCase.test_html_base-def"><a name="L2558"></a><tt class="py-lineno">2558</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_html_base-toggle" onclick="return toggle('ETreeOnlyTestCase.test_html_base');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_html_base">test_html_base</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7968 </div><div id="ETreeOnlyTestCase.test_html_base-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_html_base-expanded"><a name="L2559"></a><tt class="py-lineno">2559</tt> <tt class="py-line"> <tt id="link-2699" class="py-name"><a title="lxml.etree
7969 lxml.sax.ElementTreeContentHandler.etree
7970 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7971 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7972 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2699', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2700" class="py-name"><a title="lxml.etree
7973 lxml.sax.ElementTreeContentHandler.etree
7974 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7975 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7976 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2700', 'etree', 'link-10');">etree</a></tt> </tt>
7977 <a name="L2560"></a><tt class="py-lineno">2560</tt> <tt class="py-line"> <tt id="link-2701" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2701', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-2702" class="py-name"><a title="lxml.etree
7978 lxml.sax.ElementTreeContentHandler.etree
7979 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7980 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7981 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2702', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2703" class="py-name"><a title="lxml.etree.ErrorDomains.HTML
7983 lxml.html.builder.HTML" class="py-name" href="#" onclick="return doclink('link-2703', 'HTML', 'link-589');">HTML</a></tt><tt class="py-op">(</tt><tt id="link-2704" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2704', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">"<html><body></body></html>"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
7984 <a name="L2561"></a><tt class="py-lineno">2561</tt> <tt class="py-line"> <tt id="link-2705" class="py-name"><a title="lxml.html.HtmlMixin.base_url" class="py-name" href="#" onclick="return doclink('link-2705', 'base_url', 'link-1269');">base_url</a></tt><tt class="py-op">=</tt><tt class="py-string">"http://no/such/url"</tt><tt class="py-op">)</tt> </tt>
7985 <a name="L2562"></a><tt class="py-lineno">2562</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2706" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2706', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-2707" class="py-name"><a title="lxml.etree._Element.base" class="py-name" href="#" onclick="return doclink('link-2707', 'base', 'link-2673');">base</a></tt><tt class="py-op">,</tt> <tt class="py-string">"http://no/such/url"</tt><tt class="py-op">)</tt> </tt>
7986 </div><a name="L2563"></a><tt class="py-lineno">2563</tt> <tt class="py-line"> </tt>
7987 <a name="ETreeOnlyTestCase.test_html_base_tag"></a><div id="ETreeOnlyTestCase.test_html_base_tag-def"><a name="L2564"></a><tt class="py-lineno">2564</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_html_base_tag-toggle" onclick="return toggle('ETreeOnlyTestCase.test_html_base_tag');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_html_base_tag">test_html_base_tag</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
7988 </div><div id="ETreeOnlyTestCase.test_html_base_tag-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_html_base_tag-expanded"><a name="L2565"></a><tt class="py-lineno">2565</tt> <tt class="py-line"> <tt id="link-2708" class="py-name"><a title="lxml.etree
7989 lxml.sax.ElementTreeContentHandler.etree
7990 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7991 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7992 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2708', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2709" class="py-name"><a title="lxml.etree
7993 lxml.sax.ElementTreeContentHandler.etree
7994 lxml.tests.test_elementtree.CElementTreeTestCase.etree
7995 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
7996 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2709', 'etree', 'link-10');">etree</a></tt> </tt>
7997 <a name="L2566"></a><tt class="py-lineno">2566</tt> <tt class="py-line"> <tt id="link-2710" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2710', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-2711" class="py-name"><a title="lxml.etree
7998 lxml.sax.ElementTreeContentHandler.etree
7999 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8000 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8001 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2711', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2712" class="py-name"><a title="lxml.etree.ErrorDomains.HTML
8003 lxml.html.builder.HTML" class="py-name" href="#" onclick="return doclink('link-2712', 'HTML', 'link-589');">HTML</a></tt><tt class="py-op">(</tt><tt id="link-2713" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2713', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<html><head><base href="http://no/such/url"></head></html>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8004 <a name="L2567"></a><tt class="py-lineno">2567</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2714" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2714', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-2715" class="py-name"><a title="lxml.etree._Element.base" class="py-name" href="#" onclick="return doclink('link-2715', 'base', 'link-2673');">base</a></tt><tt class="py-op">,</tt> <tt class="py-string">"http://no/such/url"</tt><tt class="py-op">)</tt> </tt>
8005 </div><a name="L2568"></a><tt class="py-lineno">2568</tt> <tt class="py-line"> </tt>
8006 <a name="ETreeOnlyTestCase.test_parse_fileobject_unicode"></a><div id="ETreeOnlyTestCase.test_parse_fileobject_unicode-def"><a name="L2569"></a><tt class="py-lineno">2569</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_parse_fileobject_unicode-toggle" onclick="return toggle('ETreeOnlyTestCase.test_parse_fileobject_unicode');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parse_fileobject_unicode">test_parse_fileobject_unicode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
8007 </div><div id="ETreeOnlyTestCase.test_parse_fileobject_unicode-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_parse_fileobject_unicode-expanded"><a name="L2570"></a><tt class="py-lineno">2570</tt> <tt class="py-line"> <tt class="py-comment"># parse from a file object that returns unicode strings</tt> </tt>
8008 <a name="L2571"></a><tt class="py-lineno">2571</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt id="link-2716" class="py-name"><a title="lxml.tests.common_imports.LargeFileLikeUnicode" class="py-name" href="#" onclick="return doclink('link-2716', 'LargeFileLikeUnicode', 'link-16');">LargeFileLikeUnicode</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
8009 <a name="L2572"></a><tt class="py-lineno">2572</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2717" class="py-name"><a title="lxml.etree
8010 lxml.sax.ElementTreeContentHandler.etree
8011 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8012 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8013 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2717', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2718" class="py-name"><a title="lxml.cssselect.parse
8014 lxml.etree._ElementTree.parse
8016 lxml.html.ElementSoup.parse
8017 lxml.html.html5parser.parse
8019 lxml.html.soupparser.parse
8020 lxml.objectify.parse
8021 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-2718', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
8022 <a name="L2573"></a><tt class="py-lineno">2573</tt> <tt class="py-line"> <tt id="link-2719" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2719', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-2720" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-2720', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
8023 <a name="L2574"></a><tt class="py-lineno">2574</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2721" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-2721', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt id="link-2722" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2722', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-2723" class="py-name"><a title="lxml.etree._Comment.tag
8024 lxml.etree._Element.tag
8025 lxml.etree._Entity.tag
8026 lxml.etree._ProcessingInstruction.tag
8027 lxml.etree._ReadOnlyProxy.tag
8028 lxml.tests.test_xpathevaluator.tag
8029 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-2723', 'tag', 'link-73');">tag</a></tt><tt class="py-op">.</tt><tt class="py-name">endswith</tt><tt class="py-op">(</tt><tt class="py-string">'root'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8030 </div><a name="L2575"></a><tt class="py-lineno">2575</tt> <tt class="py-line"> </tt>
8031 <a name="ETreeOnlyTestCase.test_dtd_io"></a><div id="ETreeOnlyTestCase.test_dtd_io-def"><a name="L2576"></a><tt class="py-lineno">2576</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_dtd_io-toggle" onclick="return toggle('ETreeOnlyTestCase.test_dtd_io');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_dtd_io">test_dtd_io</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
8032 </div><div id="ETreeOnlyTestCase.test_dtd_io-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_dtd_io-expanded"><a name="L2577"></a><tt class="py-lineno">2577</tt> <tt class="py-line"> <tt class="py-comment"># check that DTDs that go in also go back out</tt> </tt>
8033 <a name="L2578"></a><tt class="py-lineno">2578</tt> <tt class="py-line"> <tt id="link-2724" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-2724', 'xml', 'link-256');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-2725" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2725', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'''\</tt> </tt>
8034 <a name="L2579"></a><tt class="py-lineno">2579</tt> <tt class="py-line"><tt class="py-string"> <!DOCTYPE test SYSTEM "test.dtd" [</tt> </tt>
8035 <a name="L2580"></a><tt class="py-lineno">2580</tt> <tt class="py-line"><tt class="py-string"> <!ENTITY entity "tasty"></tt> </tt>
8036 <a name="L2581"></a><tt class="py-lineno">2581</tt> <tt class="py-line"><tt class="py-string"> <!ELEMENT test (a)></tt> </tt>
8037 <a name="L2582"></a><tt class="py-lineno">2582</tt> <tt class="py-line"><tt class="py-string"> <!ELEMENT a (#PCDATA)></tt> </tt>
8038 <a name="L2583"></a><tt class="py-lineno">2583</tt> <tt class="py-line"><tt class="py-string"> ]></tt> </tt>
8039 <a name="L2584"></a><tt class="py-lineno">2584</tt> <tt class="py-line"><tt class="py-string"> <test><a>test-test</a></test>\</tt> </tt>
8040 <a name="L2585"></a><tt class="py-lineno">2585</tt> <tt class="py-line"><tt class="py-string"> '''</tt><tt class="py-op">)</tt> </tt>
8041 <a name="L2586"></a><tt class="py-lineno">2586</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2726" class="py-name"><a title="lxml.etree
8042 lxml.sax.ElementTreeContentHandler.etree
8043 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8044 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8045 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2726', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2727" class="py-name"><a title="lxml.cssselect.parse
8046 lxml.etree._ElementTree.parse
8048 lxml.html.ElementSoup.parse
8049 lxml.html.html5parser.parse
8051 lxml.html.soupparser.parse
8052 lxml.objectify.parse
8053 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-2727', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt id="link-2728" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-2728', 'xml', 'link-256');">xml</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8054 <a name="L2587"></a><tt class="py-lineno">2587</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEqual</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2729" class="py-name"><a title="lxml.etree
8055 lxml.sax.ElementTreeContentHandler.etree
8056 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8057 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8058 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2729', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2730" class="py-name"><a title="lxml.etree.XSLT.tostring
8060 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2730', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-2731" class="py-name"><a title="lxml.etree._Element.replace
8061 lxml.etree._ExsltRegExp.replace" class="py-name" href="#" onclick="return doclink('link-2731', 'replace', 'link-539');">replace</a></tt><tt class="py-op">(</tt><tt id="link-2732" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2732', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">" "</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-2733" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2733', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
8062 <a name="L2588"></a><tt class="py-lineno">2588</tt> <tt class="py-line"> <tt id="link-2734" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.xml" class="py-name" href="#" onclick="return doclink('link-2734', 'xml', 'link-256');">xml</a></tt><tt class="py-op">.</tt><tt id="link-2735" class="py-name"><a title="lxml.etree._Element.replace
8063 lxml.etree._ExsltRegExp.replace" class="py-name" href="#" onclick="return doclink('link-2735', 'replace', 'link-539');">replace</a></tt><tt class="py-op">(</tt><tt id="link-2736" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2736', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">" "</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-2737" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2737', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8064 </div><a name="L2589"></a><tt class="py-lineno">2589</tt> <tt class="py-line"> </tt>
8065 <a name="ETreeOnlyTestCase.test_byte_zero"></a><div id="ETreeOnlyTestCase.test_byte_zero-def"><a name="L2590"></a><tt class="py-lineno">2590</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_byte_zero-toggle" onclick="return toggle('ETreeOnlyTestCase.test_byte_zero');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_byte_zero">test_byte_zero</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
8066 </div><div id="ETreeOnlyTestCase.test_byte_zero-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_byte_zero-expanded"><a name="L2591"></a><tt class="py-lineno">2591</tt> <tt class="py-line"> <tt id="link-2738" class="py-name"><a title="lxml.cssselect.Element
8069 lxml.objectify.Element
8070 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8071 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2738', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2739" class="py-name"><a title="lxml.etree
8072 lxml.sax.ElementTreeContentHandler.etree
8073 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8074 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8075 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2739', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2740" class="py-name"><a title="lxml.cssselect.Element
8078 lxml.objectify.Element
8079 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8080 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2740', 'Element', 'link-69');">Element</a></tt> </tt>
8081 <a name="L2592"></a><tt class="py-lineno">2592</tt> <tt class="py-line"> </tt>
8082 <a name="L2593"></a><tt class="py-lineno">2593</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-2741" class="py-name"><a title="lxml.cssselect.Element
8085 lxml.objectify.Element
8086 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8087 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2741', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
8088 <a name="L2594"></a><tt class="py-lineno">2594</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2742" class="py-name"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-2742', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">"text"</tt><tt class="py-op">,</tt> <tt class="py-string">'ha\0ho'</tt><tt class="py-op">)</tt> </tt>
8089 <a name="L2595"></a><tt class="py-lineno">2595</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2743" class="py-name"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-2743', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">"tail"</tt><tt class="py-op">,</tt> <tt class="py-string">'ha\0ho'</tt><tt class="py-op">)</tt> </tt>
8090 <a name="L2596"></a><tt class="py-lineno">2596</tt> <tt class="py-line"> </tt>
8091 <a name="L2597"></a><tt class="py-lineno">2597</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2744" class="py-name"><a title="lxml.cssselect.Element
8094 lxml.objectify.Element
8095 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8096 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2744', 'Element', 'link-69');">Element</a></tt><tt class="py-op">,</tt> <tt class="py-string">'ha\0ho'</tt><tt class="py-op">)</tt> </tt>
8097 </div><a name="L2598"></a><tt class="py-lineno">2598</tt> <tt class="py-line"> </tt>
8098 <a name="ETreeOnlyTestCase.test_unicode_byte_zero"></a><div id="ETreeOnlyTestCase.test_unicode_byte_zero-def"><a name="L2599"></a><tt class="py-lineno">2599</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_unicode_byte_zero-toggle" onclick="return toggle('ETreeOnlyTestCase.test_unicode_byte_zero');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_unicode_byte_zero">test_unicode_byte_zero</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
8099 </div><div id="ETreeOnlyTestCase.test_unicode_byte_zero-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_unicode_byte_zero-expanded"><a name="L2600"></a><tt class="py-lineno">2600</tt> <tt class="py-line"> <tt id="link-2745" class="py-name"><a title="lxml.cssselect.Element
8102 lxml.objectify.Element
8103 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8104 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2745', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2746" class="py-name"><a title="lxml.etree
8105 lxml.sax.ElementTreeContentHandler.etree
8106 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8107 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8108 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2746', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2747" class="py-name"><a title="lxml.cssselect.Element
8111 lxml.objectify.Element
8112 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8113 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2747', 'Element', 'link-69');">Element</a></tt> </tt>
8114 <a name="L2601"></a><tt class="py-lineno">2601</tt> <tt class="py-line"> </tt>
8115 <a name="L2602"></a><tt class="py-lineno">2602</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-2748" class="py-name"><a title="lxml.cssselect.Element
8118 lxml.objectify.Element
8119 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8120 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2748', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
8121 <a name="L2603"></a><tt class="py-lineno">2603</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2749" class="py-name"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-2749', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">"text"</tt><tt class="py-op">,</tt> </tt>
8122 <a name="L2604"></a><tt class="py-lineno">2604</tt> <tt class="py-line"> <tt id="link-2750" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-2750', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'ha\0ho'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8123 <a name="L2605"></a><tt class="py-lineno">2605</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2751" class="py-name"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-2751', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">"tail"</tt><tt class="py-op">,</tt> </tt>
8124 <a name="L2606"></a><tt class="py-lineno">2606</tt> <tt class="py-line"> <tt id="link-2752" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-2752', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'ha\0ho'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8125 <a name="L2607"></a><tt class="py-lineno">2607</tt> <tt class="py-line"> </tt>
8126 <a name="L2608"></a><tt class="py-lineno">2608</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2753" class="py-name"><a title="lxml.cssselect.Element
8129 lxml.objectify.Element
8130 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8131 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2753', 'Element', 'link-69');">Element</a></tt><tt class="py-op">,</tt> </tt>
8132 <a name="L2609"></a><tt class="py-lineno">2609</tt> <tt class="py-line"> <tt id="link-2754" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-2754', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'ha\0ho'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8133 </div><a name="L2610"></a><tt class="py-lineno">2610</tt> <tt class="py-line"> </tt>
8134 <a name="ETreeOnlyTestCase.test_byte_invalid"></a><div id="ETreeOnlyTestCase.test_byte_invalid-def"><a name="L2611"></a><tt class="py-lineno">2611</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_byte_invalid-toggle" onclick="return toggle('ETreeOnlyTestCase.test_byte_invalid');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_byte_invalid">test_byte_invalid</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
8135 </div><div id="ETreeOnlyTestCase.test_byte_invalid-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_byte_invalid-expanded"><a name="L2612"></a><tt class="py-lineno">2612</tt> <tt class="py-line"> <tt id="link-2755" class="py-name"><a title="lxml.cssselect.Element
8138 lxml.objectify.Element
8139 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8140 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2755', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2756" class="py-name"><a title="lxml.etree
8141 lxml.sax.ElementTreeContentHandler.etree
8142 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8143 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8144 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2756', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2757" class="py-name"><a title="lxml.cssselect.Element
8147 lxml.objectify.Element
8148 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8149 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2757', 'Element', 'link-69');">Element</a></tt> </tt>
8150 <a name="L2613"></a><tt class="py-lineno">2613</tt> <tt class="py-line"> </tt>
8151 <a name="L2614"></a><tt class="py-lineno">2614</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-2758" class="py-name"><a title="lxml.cssselect.Element
8154 lxml.objectify.Element
8155 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8156 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2758', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
8157 <a name="L2615"></a><tt class="py-lineno">2615</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2759" class="py-name"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-2759', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">"text"</tt><tt class="py-op">,</tt> <tt class="py-string">'ha\x07ho'</tt><tt class="py-op">)</tt> </tt>
8158 <a name="L2616"></a><tt class="py-lineno">2616</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2760" class="py-name"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-2760', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">"text"</tt><tt class="py-op">,</tt> <tt class="py-string">'ha\x02ho'</tt><tt class="py-op">)</tt> </tt>
8159 <a name="L2617"></a><tt class="py-lineno">2617</tt> <tt class="py-line"> </tt>
8160 <a name="L2618"></a><tt class="py-lineno">2618</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2761" class="py-name"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-2761', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">"tail"</tt><tt class="py-op">,</tt> <tt class="py-string">'ha\x07ho'</tt><tt class="py-op">)</tt> </tt>
8161 <a name="L2619"></a><tt class="py-lineno">2619</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2762" class="py-name"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-2762', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">"tail"</tt><tt class="py-op">,</tt> <tt class="py-string">'ha\x02ho'</tt><tt class="py-op">)</tt> </tt>
8162 <a name="L2620"></a><tt class="py-lineno">2620</tt> <tt class="py-line"> </tt>
8163 <a name="L2621"></a><tt class="py-lineno">2621</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2763" class="py-name"><a title="lxml.cssselect.Element
8166 lxml.objectify.Element
8167 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8168 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2763', 'Element', 'link-69');">Element</a></tt><tt class="py-op">,</tt> <tt class="py-string">'ha\x07ho'</tt><tt class="py-op">)</tt> </tt>
8169 <a name="L2622"></a><tt class="py-lineno">2622</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2764" class="py-name"><a title="lxml.cssselect.Element
8172 lxml.objectify.Element
8173 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8174 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2764', 'Element', 'link-69');">Element</a></tt><tt class="py-op">,</tt> <tt class="py-string">'ha\x02ho'</tt><tt class="py-op">)</tt> </tt>
8175 </div><a name="L2623"></a><tt class="py-lineno">2623</tt> <tt class="py-line"> </tt>
8176 <a name="ETreeOnlyTestCase.test_unicode_byte_invalid"></a><div id="ETreeOnlyTestCase.test_unicode_byte_invalid-def"><a name="L2624"></a><tt class="py-lineno">2624</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_unicode_byte_invalid-toggle" onclick="return toggle('ETreeOnlyTestCase.test_unicode_byte_invalid');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_unicode_byte_invalid">test_unicode_byte_invalid</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
8177 </div><div id="ETreeOnlyTestCase.test_unicode_byte_invalid-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_unicode_byte_invalid-expanded"><a name="L2625"></a><tt class="py-lineno">2625</tt> <tt class="py-line"> <tt id="link-2765" class="py-name"><a title="lxml.cssselect.Element
8180 lxml.objectify.Element
8181 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8182 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2765', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2766" class="py-name"><a title="lxml.etree
8183 lxml.sax.ElementTreeContentHandler.etree
8184 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8185 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8186 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2766', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2767" class="py-name"><a title="lxml.cssselect.Element
8189 lxml.objectify.Element
8190 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8191 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2767', 'Element', 'link-69');">Element</a></tt> </tt>
8192 <a name="L2626"></a><tt class="py-lineno">2626</tt> <tt class="py-line"> </tt>
8193 <a name="L2627"></a><tt class="py-lineno">2627</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-2768" class="py-name"><a title="lxml.cssselect.Element
8196 lxml.objectify.Element
8197 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8198 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2768', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
8199 <a name="L2628"></a><tt class="py-lineno">2628</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2769" class="py-name"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-2769', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">"text"</tt><tt class="py-op">,</tt> </tt>
8200 <a name="L2629"></a><tt class="py-lineno">2629</tt> <tt class="py-line"> <tt id="link-2770" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-2770', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'ha\x07ho'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8201 <a name="L2630"></a><tt class="py-lineno">2630</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2771" class="py-name"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-2771', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">"text"</tt><tt class="py-op">,</tt> </tt>
8202 <a name="L2631"></a><tt class="py-lineno">2631</tt> <tt class="py-line"> <tt id="link-2772" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-2772', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'ha\x02ho'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8203 <a name="L2632"></a><tt class="py-lineno">2632</tt> <tt class="py-line"> </tt>
8204 <a name="L2633"></a><tt class="py-lineno">2633</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2773" class="py-name"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-2773', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">"tail"</tt><tt class="py-op">,</tt> </tt>
8205 <a name="L2634"></a><tt class="py-lineno">2634</tt> <tt class="py-line"> <tt id="link-2774" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-2774', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'ha\x07ho'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8206 <a name="L2635"></a><tt class="py-lineno">2635</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2775" class="py-name"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-2775', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">"tail"</tt><tt class="py-op">,</tt> </tt>
8207 <a name="L2636"></a><tt class="py-lineno">2636</tt> <tt class="py-line"> <tt id="link-2776" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-2776', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'ha\x02ho'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8208 <a name="L2637"></a><tt class="py-lineno">2637</tt> <tt class="py-line"> </tt>
8209 <a name="L2638"></a><tt class="py-lineno">2638</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2777" class="py-name"><a title="lxml.cssselect.Element
8212 lxml.objectify.Element
8213 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8214 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2777', 'Element', 'link-69');">Element</a></tt><tt class="py-op">,</tt> </tt>
8215 <a name="L2639"></a><tt class="py-lineno">2639</tt> <tt class="py-line"> <tt id="link-2778" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-2778', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'ha\x07ho'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8216 <a name="L2640"></a><tt class="py-lineno">2640</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2779" class="py-name"><a title="lxml.cssselect.Element
8219 lxml.objectify.Element
8220 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8221 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2779', 'Element', 'link-69');">Element</a></tt><tt class="py-op">,</tt> </tt>
8222 <a name="L2641"></a><tt class="py-lineno">2641</tt> <tt class="py-line"> <tt id="link-2780" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-2780', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'ha\x02ho'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8223 </div><a name="L2642"></a><tt class="py-lineno">2642</tt> <tt class="py-line"> </tt>
8224 <a name="ETreeOnlyTestCase.test_unicode_byte_invalid_sequence"></a><div id="ETreeOnlyTestCase.test_unicode_byte_invalid_sequence-def"><a name="L2643"></a><tt class="py-lineno">2643</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_unicode_byte_invalid_sequence-toggle" onclick="return toggle('ETreeOnlyTestCase.test_unicode_byte_invalid_sequence');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_unicode_byte_invalid_sequence">test_unicode_byte_invalid_sequence</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
8225 </div><div id="ETreeOnlyTestCase.test_unicode_byte_invalid_sequence-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_unicode_byte_invalid_sequence-expanded"><a name="L2644"></a><tt class="py-lineno">2644</tt> <tt class="py-line"> <tt id="link-2781" class="py-name"><a title="lxml.cssselect.Element
8228 lxml.objectify.Element
8229 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8230 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2781', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2782" class="py-name"><a title="lxml.etree
8231 lxml.sax.ElementTreeContentHandler.etree
8232 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8233 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8234 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2782', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2783" class="py-name"><a title="lxml.cssselect.Element
8237 lxml.objectify.Element
8238 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8239 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2783', 'Element', 'link-69');">Element</a></tt> </tt>
8240 <a name="L2645"></a><tt class="py-lineno">2645</tt> <tt class="py-line"> </tt>
8241 <a name="L2646"></a><tt class="py-lineno">2646</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-2784" class="py-name"><a title="lxml.cssselect.Element
8244 lxml.objectify.Element
8245 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8246 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2784', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
8247 <a name="L2647"></a><tt class="py-lineno">2647</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2785" class="py-name"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-2785', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">"text"</tt><tt class="py-op">,</tt> </tt>
8248 <a name="L2648"></a><tt class="py-lineno">2648</tt> <tt class="py-line"> <tt id="link-2786" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-2786', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'ha\u1234\x07ho'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8249 <a name="L2649"></a><tt class="py-lineno">2649</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2787" class="py-name"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-2787', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">"text"</tt><tt class="py-op">,</tt> </tt>
8250 <a name="L2650"></a><tt class="py-lineno">2650</tt> <tt class="py-line"> <tt id="link-2788" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-2788', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'ha\u1234\x02ho'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8251 <a name="L2651"></a><tt class="py-lineno">2651</tt> <tt class="py-line"> </tt>
8252 <a name="L2652"></a><tt class="py-lineno">2652</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2789" class="py-name"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-2789', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">"tail"</tt><tt class="py-op">,</tt> </tt>
8253 <a name="L2653"></a><tt class="py-lineno">2653</tt> <tt class="py-line"> <tt id="link-2790" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-2790', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'ha\u1234\x07ho'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8254 <a name="L2654"></a><tt class="py-lineno">2654</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2791" class="py-name"><a title="lxml.objectify.ObjectPath.setattr" class="py-name" href="#" onclick="return doclink('link-2791', 'setattr', 'link-81');">setattr</a></tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">"tail"</tt><tt class="py-op">,</tt> </tt>
8255 <a name="L2655"></a><tt class="py-lineno">2655</tt> <tt class="py-line"> <tt id="link-2792" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-2792', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'ha\u1234\x02ho'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8256 <a name="L2656"></a><tt class="py-lineno">2656</tt> <tt class="py-line"> </tt>
8257 <a name="L2657"></a><tt class="py-lineno">2657</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2793" class="py-name"><a title="lxml.cssselect.Element
8260 lxml.objectify.Element
8261 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8262 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2793', 'Element', 'link-69');">Element</a></tt><tt class="py-op">,</tt> </tt>
8263 <a name="L2658"></a><tt class="py-lineno">2658</tt> <tt class="py-line"> <tt id="link-2794" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-2794', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'ha\u1234\x07ho'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8264 <a name="L2659"></a><tt class="py-lineno">2659</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt id="link-2795" class="py-name"><a title="lxml.cssselect.Element
8267 lxml.objectify.Element
8268 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8269 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2795', 'Element', 'link-69');">Element</a></tt><tt class="py-op">,</tt> </tt>
8270 <a name="L2660"></a><tt class="py-lineno">2660</tt> <tt class="py-line"> <tt id="link-2796" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-2796', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'ha\u1234\x02ho'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8271 </div><a name="L2661"></a><tt class="py-lineno">2661</tt> <tt class="py-line"> </tt>
8272 <a name="ETreeOnlyTestCase.test_encoding_tostring_utf16"></a><div id="ETreeOnlyTestCase.test_encoding_tostring_utf16-def"><a name="L2662"></a><tt class="py-lineno">2662</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_encoding_tostring_utf16-toggle" onclick="return toggle('ETreeOnlyTestCase.test_encoding_tostring_utf16');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_encoding_tostring_utf16">test_encoding_tostring_utf16</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
8273 </div><div id="ETreeOnlyTestCase.test_encoding_tostring_utf16-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_encoding_tostring_utf16-expanded"><a name="L2663"></a><tt class="py-lineno">2663</tt> <tt class="py-line"> <tt class="py-comment"># ElementTree fails to serialize this</tt> </tt>
8274 <a name="L2664"></a><tt class="py-lineno">2664</tt> <tt class="py-line"> <tt id="link-2797" class="py-name"><a title="lxml.etree.XSLT.tostring
8276 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2797', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2798" class="py-name"><a title="lxml.etree
8277 lxml.sax.ElementTreeContentHandler.etree
8278 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8279 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8280 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2798', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2799" class="py-name"><a title="lxml.etree.XSLT.tostring
8282 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2799', 'tostring', 'link-597');">tostring</a></tt> </tt>
8283 <a name="L2665"></a><tt class="py-lineno">2665</tt> <tt class="py-line"> <tt id="link-2800" class="py-name"><a title="lxml.cssselect.Element
8286 lxml.objectify.Element
8287 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8288 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2800', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2801" class="py-name"><a title="lxml.etree
8289 lxml.sax.ElementTreeContentHandler.etree
8290 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8291 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8292 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2801', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2802" class="py-name"><a title="lxml.cssselect.Element
8295 lxml.objectify.Element
8296 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8297 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2802', 'Element', 'link-69');">Element</a></tt> </tt>
8298 <a name="L2666"></a><tt class="py-lineno">2666</tt> <tt class="py-line"> <tt id="link-2803" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2803', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2804" class="py-name"><a title="lxml.etree
8299 lxml.sax.ElementTreeContentHandler.etree
8300 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8301 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8302 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2804', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2805" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2805', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
8303 <a name="L2667"></a><tt class="py-lineno">2667</tt> <tt class="py-line"> </tt>
8304 <a name="L2668"></a><tt class="py-lineno">2668</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-2806" class="py-name"><a title="lxml.cssselect.Element
8307 lxml.objectify.Element
8308 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8309 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2806', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
8310 <a name="L2669"></a><tt class="py-lineno">2669</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-2807" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2807', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
8311 <a name="L2670"></a><tt class="py-lineno">2670</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-2808" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2808', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
8312 <a name="L2671"></a><tt class="py-lineno">2671</tt> <tt class="py-line"> </tt>
8313 <a name="L2672"></a><tt class="py-lineno">2672</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-2809" class="py-name"><a title="lxml.etree.XSLT.tostring
8315 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2809', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt id="link-2810" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-2810', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-string">'UTF-16'</tt><tt class="py-op">)</tt> </tt>
8316 <a name="L2673"></a><tt class="py-lineno">2673</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2811" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2811', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b></b><c></c></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
8317 <a name="L2674"></a><tt class="py-lineno">2674</tt> <tt class="py-line"> <tt id="link-2812" class="py-name"><a title="lxml.tests.common_imports.canonicalize" class="py-name" href="#" onclick="return doclink('link-2812', 'canonicalize', 'link-19');">canonicalize</a></tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8318 </div><a name="L2675"></a><tt class="py-lineno">2675</tt> <tt class="py-line"> </tt>
8319 <a name="ETreeOnlyTestCase.test_tostring_none"></a><div id="ETreeOnlyTestCase.test_tostring_none-def"><a name="L2676"></a><tt class="py-lineno">2676</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_tostring_none-toggle" onclick="return toggle('ETreeOnlyTestCase.test_tostring_none');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_none">test_tostring_none</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
8320 </div><div id="ETreeOnlyTestCase.test_tostring_none-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_tostring_none-expanded"><a name="L2677"></a><tt class="py-lineno">2677</tt> <tt class="py-line"> <tt class="py-comment"># ElementTree raises an AssertionError here</tt> </tt>
8321 <a name="L2678"></a><tt class="py-lineno">2678</tt> <tt class="py-line"> <tt id="link-2813" class="py-name"><a title="lxml.etree.XSLT.tostring
8323 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2813', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2814" class="py-name"><a title="lxml.etree
8324 lxml.sax.ElementTreeContentHandler.etree
8325 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8326 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8327 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2814', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2815" class="py-name"><a title="lxml.etree.XSLT.tostring
8329 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2815', 'tostring', 'link-597');">tostring</a></tt> </tt>
8330 <a name="L2679"></a><tt class="py-lineno">2679</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">TypeError</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2816" class="py-name"><a title="lxml.etree
8331 lxml.sax.ElementTreeContentHandler.etree
8332 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8333 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8334 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2816', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2817" class="py-name"><a title="lxml.etree.XSLT.tostring
8336 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2817', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
8337 </div><a name="L2680"></a><tt class="py-lineno">2680</tt> <tt class="py-line"> </tt>
8338 <a name="ETreeOnlyTestCase.test_tostring_pretty"></a><div id="ETreeOnlyTestCase.test_tostring_pretty-def"><a name="L2681"></a><tt class="py-lineno">2681</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_tostring_pretty-toggle" onclick="return toggle('ETreeOnlyTestCase.test_tostring_pretty');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_pretty">test_tostring_pretty</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
8339 </div><div id="ETreeOnlyTestCase.test_tostring_pretty-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_tostring_pretty-expanded"><a name="L2682"></a><tt class="py-lineno">2682</tt> <tt class="py-line"> <tt id="link-2818" class="py-name"><a title="lxml.etree.XSLT.tostring
8341 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2818', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2819" class="py-name"><a title="lxml.etree
8342 lxml.sax.ElementTreeContentHandler.etree
8343 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8344 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8345 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2819', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2820" class="py-name"><a title="lxml.etree.XSLT.tostring
8347 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2820', 'tostring', 'link-597');">tostring</a></tt> </tt>
8348 <a name="L2683"></a><tt class="py-lineno">2683</tt> <tt class="py-line"> <tt id="link-2821" class="py-name"><a title="lxml.cssselect.Element
8351 lxml.objectify.Element
8352 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8353 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2821', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2822" class="py-name"><a title="lxml.etree
8354 lxml.sax.ElementTreeContentHandler.etree
8355 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8356 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8357 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2822', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2823" class="py-name"><a title="lxml.cssselect.Element
8360 lxml.objectify.Element
8361 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8362 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2823', 'Element', 'link-69');">Element</a></tt> </tt>
8363 <a name="L2684"></a><tt class="py-lineno">2684</tt> <tt class="py-line"> <tt id="link-2824" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2824', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2825" class="py-name"><a title="lxml.etree
8364 lxml.sax.ElementTreeContentHandler.etree
8365 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8366 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8367 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2825', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2826" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2826', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
8368 <a name="L2685"></a><tt class="py-lineno">2685</tt> <tt class="py-line"> </tt>
8369 <a name="L2686"></a><tt class="py-lineno">2686</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-2827" class="py-name"><a title="lxml.cssselect.Element
8372 lxml.objectify.Element
8373 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8374 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2827', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
8375 <a name="L2687"></a><tt class="py-lineno">2687</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-2828" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2828', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
8376 <a name="L2688"></a><tt class="py-lineno">2688</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-2829" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2829', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
8377 <a name="L2689"></a><tt class="py-lineno">2689</tt> <tt class="py-line"> </tt>
8378 <a name="L2690"></a><tt class="py-lineno">2690</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-2830" class="py-name"><a title="lxml.etree.XSLT.tostring
8380 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2830', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt> </tt>
8381 <a name="L2691"></a><tt class="py-lineno">2691</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt id="link-2831" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2831', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">"<a><b/><c/></a>"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8382 <a name="L2692"></a><tt class="py-lineno">2692</tt> <tt class="py-line"> </tt>
8383 <a name="L2693"></a><tt class="py-lineno">2693</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-2832" class="py-name"><a title="lxml.etree.XSLT.tostring
8385 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2832', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-name">pretty_print</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
8386 <a name="L2694"></a><tt class="py-lineno">2694</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt id="link-2833" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2833', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">"<a><b/><c/></a>"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8387 <a name="L2695"></a><tt class="py-lineno">2695</tt> <tt class="py-line"> </tt>
8388 <a name="L2696"></a><tt class="py-lineno">2696</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-2834" class="py-name"><a title="lxml.etree.XSLT.tostring
8390 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2834', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-name">pretty_print</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
8391 <a name="L2697"></a><tt class="py-lineno">2697</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt id="link-2835" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2835', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">"<a>\n <b/>\n <c/>\n</a>\n"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8392 </div><a name="L2698"></a><tt class="py-lineno">2698</tt> <tt class="py-line"> </tt>
8393 <a name="ETreeOnlyTestCase.test_tostring_with_tail"></a><div id="ETreeOnlyTestCase.test_tostring_with_tail-def"><a name="L2699"></a><tt class="py-lineno">2699</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_tostring_with_tail-toggle" onclick="return toggle('ETreeOnlyTestCase.test_tostring_with_tail');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_with_tail">test_tostring_with_tail</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
8394 </div><div id="ETreeOnlyTestCase.test_tostring_with_tail-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_tostring_with_tail-expanded"><a name="L2700"></a><tt class="py-lineno">2700</tt> <tt class="py-line"> <tt id="link-2836" class="py-name"><a title="lxml.etree.XSLT.tostring
8396 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2836', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2837" class="py-name"><a title="lxml.etree
8397 lxml.sax.ElementTreeContentHandler.etree
8398 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8399 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8400 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2837', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2838" class="py-name"><a title="lxml.etree.XSLT.tostring
8402 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2838', 'tostring', 'link-597');">tostring</a></tt> </tt>
8403 <a name="L2701"></a><tt class="py-lineno">2701</tt> <tt class="py-line"> <tt id="link-2839" class="py-name"><a title="lxml.cssselect.Element
8406 lxml.objectify.Element
8407 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8408 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2839', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2840" class="py-name"><a title="lxml.etree
8409 lxml.sax.ElementTreeContentHandler.etree
8410 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8411 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8412 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2840', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2841" class="py-name"><a title="lxml.cssselect.Element
8415 lxml.objectify.Element
8416 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8417 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2841', 'Element', 'link-69');">Element</a></tt> </tt>
8418 <a name="L2702"></a><tt class="py-lineno">2702</tt> <tt class="py-line"> <tt id="link-2842" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2842', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2843" class="py-name"><a title="lxml.etree
8419 lxml.sax.ElementTreeContentHandler.etree
8420 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8421 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8422 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2843', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2844" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2844', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
8423 <a name="L2703"></a><tt class="py-lineno">2703</tt> <tt class="py-line"> </tt>
8424 <a name="L2704"></a><tt class="py-lineno">2704</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-2845" class="py-name"><a title="lxml.cssselect.Element
8427 lxml.objectify.Element
8428 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8429 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2845', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
8430 <a name="L2705"></a><tt class="py-lineno">2705</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-2846" class="py-name"><a title="lxml.etree._Element.tail
8431 lxml.etree._ReadOnlyProxy.tail
8432 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-2846', 'tail', 'link-850');">tail</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"aTAIL"</tt> </tt>
8433 <a name="L2706"></a><tt class="py-lineno">2706</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-2847" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2847', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
8434 <a name="L2707"></a><tt class="py-lineno">2707</tt> <tt class="py-line"> <tt class="py-name">b</tt><tt class="py-op">.</tt><tt id="link-2848" class="py-name"><a title="lxml.etree._Element.tail
8435 lxml.etree._ReadOnlyProxy.tail
8436 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-2848', 'tail', 'link-850');">tail</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"bTAIL"</tt> </tt>
8437 <a name="L2708"></a><tt class="py-lineno">2708</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-2849" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2849', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
8438 <a name="L2709"></a><tt class="py-lineno">2709</tt> <tt class="py-line"> </tt>
8439 <a name="L2710"></a><tt class="py-lineno">2710</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-2850" class="py-name"><a title="lxml.etree.XSLT.tostring
8441 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2850', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt> </tt>
8442 <a name="L2711"></a><tt class="py-lineno">2711</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt id="link-2851" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2851', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">"<a><b/>bTAIL<c/></a>aTAIL"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8443 <a name="L2712"></a><tt class="py-lineno">2712</tt> <tt class="py-line"> </tt>
8444 <a name="L2713"></a><tt class="py-lineno">2713</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-2852" class="py-name"><a title="lxml.etree.XSLT.tostring
8446 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2852', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-name">with_tail</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
8447 <a name="L2714"></a><tt class="py-lineno">2714</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt id="link-2853" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2853', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">"<a><b/>bTAIL<c/></a>"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8448 <a name="L2715"></a><tt class="py-lineno">2715</tt> <tt class="py-line"> </tt>
8449 <a name="L2716"></a><tt class="py-lineno">2716</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-2854" class="py-name"><a title="lxml.etree.XSLT.tostring
8451 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2854', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-name">with_tail</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
8452 <a name="L2717"></a><tt class="py-lineno">2717</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt id="link-2855" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2855', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">"<a><b/>bTAIL<c/></a>aTAIL"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8453 </div><a name="L2718"></a><tt class="py-lineno">2718</tt> <tt class="py-line"> </tt>
8454 <a name="ETreeOnlyTestCase.test_standalone"></a><div id="ETreeOnlyTestCase.test_standalone-def"><a name="L2719"></a><tt class="py-lineno">2719</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_standalone-toggle" onclick="return toggle('ETreeOnlyTestCase.test_standalone');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_standalone">test_standalone</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
8455 </div><div id="ETreeOnlyTestCase.test_standalone-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_standalone-expanded"><a name="L2720"></a><tt class="py-lineno">2720</tt> <tt class="py-line"> <tt id="link-2856" class="py-name"><a title="lxml.etree.XSLT.tostring
8457 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2856', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2857" class="py-name"><a title="lxml.etree
8458 lxml.sax.ElementTreeContentHandler.etree
8459 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8460 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8461 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2857', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2858" class="py-name"><a title="lxml.etree.XSLT.tostring
8463 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2858', 'tostring', 'link-597');">tostring</a></tt> </tt>
8464 <a name="L2721"></a><tt class="py-lineno">2721</tt> <tt class="py-line"> <tt id="link-2859" class="py-name"><a title="lxml.etree.XML
8466 lxml.tests.test_objectify.ObjectifyTestCase.XML
8467 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2859', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2860" class="py-name"><a title="lxml.etree
8468 lxml.sax.ElementTreeContentHandler.etree
8469 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8470 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8471 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2860', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2861" class="py-name"><a title="lxml.etree.XML
8473 lxml.tests.test_objectify.ObjectifyTestCase.XML
8474 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2861', 'XML', 'link-217');">XML</a></tt> </tt>
8475 <a name="L2722"></a><tt class="py-lineno">2722</tt> <tt class="py-line"> <tt id="link-2862" class="py-name"><a title="lxml.etree.ElementTree
8476 xml.etree.ElementTree
8477 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-2862', 'ElementTree', 'link-468');">ElementTree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2863" class="py-name"><a title="lxml.etree
8478 lxml.sax.ElementTreeContentHandler.etree
8479 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8480 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8481 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2863', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2864" class="py-name"><a title="lxml.etree.ElementTree
8482 xml.etree.ElementTree
8483 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-2864', 'ElementTree', 'link-468');">ElementTree</a></tt> </tt>
8484 <a name="L2723"></a><tt class="py-lineno">2723</tt> <tt class="py-line"> <tt id="link-2865" class="py-name"><a title="lxml.cssselect.Element
8487 lxml.objectify.Element
8488 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8489 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2865', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2866" class="py-name"><a title="lxml.etree
8490 lxml.sax.ElementTreeContentHandler.etree
8491 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8492 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8493 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2866', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2867" class="py-name"><a title="lxml.cssselect.Element
8496 lxml.objectify.Element
8497 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8498 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2867', 'Element', 'link-69');">Element</a></tt> </tt>
8499 <a name="L2724"></a><tt class="py-lineno">2724</tt> <tt class="py-line"> </tt>
8500 <a name="L2725"></a><tt class="py-lineno">2725</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-2868" class="py-name"><a title="lxml.cssselect.Element
8503 lxml.objectify.Element
8504 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8505 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2868', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">"root"</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-2869" class="py-name"><a title="lxml.etree._Element.getroottree" class="py-name" href="#" onclick="return doclink('link-2869', 'getroottree', 'link-1969');">getroottree</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
8506 <a name="L2726"></a><tt class="py-lineno">2726</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-2870" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2870', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2871" class="py-name" targets="Variable lxml.etree.DocInfo.standalone=lxml.etree.DocInfo-class.html#standalone"><a title="lxml.etree.DocInfo.standalone" class="py-name" href="#" onclick="return doclink('link-2871', 'standalone', 'link-2871');">standalone</a></tt><tt class="py-op">)</tt> </tt>
8507 <a name="L2727"></a><tt class="py-lineno">2727</tt> <tt class="py-line"> </tt>
8508 <a name="L2728"></a><tt class="py-lineno">2728</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-2872" class="py-name"><a title="lxml.etree.XML
8510 lxml.tests.test_objectify.ObjectifyTestCase.XML
8511 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2872', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-2873" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2873', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">"<root/>"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-2874" class="py-name"><a title="lxml.etree._Element.getroottree" class="py-name" href="#" onclick="return doclink('link-2874', 'getroottree', 'link-1969');">getroottree</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
8512 <a name="L2729"></a><tt class="py-lineno">2729</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-2875" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2875', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2876" class="py-name"><a title="lxml.etree.DocInfo.standalone" class="py-name" href="#" onclick="return doclink('link-2876', 'standalone', 'link-2871');">standalone</a></tt><tt class="py-op">)</tt> </tt>
8513 <a name="L2730"></a><tt class="py-lineno">2730</tt> <tt class="py-line"> </tt>
8514 <a name="L2731"></a><tt class="py-lineno">2731</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-2877" class="py-name"><a title="lxml.etree.XML
8516 lxml.tests.test_objectify.ObjectifyTestCase.XML
8517 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2877', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-2878" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2878', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt> </tt>
8518 <a name="L2732"></a><tt class="py-lineno">2732</tt> <tt class="py-line"> <tt class="py-string">"<?xml version='1.0' encoding='ASCII' standalone='yes'?>\n<root/>"</tt> </tt>
8519 <a name="L2733"></a><tt class="py-lineno">2733</tt> <tt class="py-line"> <tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-2879" class="py-name"><a title="lxml.etree._Element.getroottree" class="py-name" href="#" onclick="return doclink('link-2879', 'getroottree', 'link-1969');">getroottree</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
8520 <a name="L2734"></a><tt class="py-lineno">2734</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-2880" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2880', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2881" class="py-name"><a title="lxml.etree.DocInfo.standalone" class="py-name" href="#" onclick="return doclink('link-2881', 'standalone', 'link-2871');">standalone</a></tt><tt class="py-op">)</tt> </tt>
8521 <a name="L2735"></a><tt class="py-lineno">2735</tt> <tt class="py-line"> </tt>
8522 <a name="L2736"></a><tt class="py-lineno">2736</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-2882" class="py-name"><a title="lxml.etree.XML
8524 lxml.tests.test_objectify.ObjectifyTestCase.XML
8525 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2882', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-2883" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2883', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt> </tt>
8526 <a name="L2737"></a><tt class="py-lineno">2737</tt> <tt class="py-line"> <tt class="py-string">"<?xml version='1.0' encoding='ASCII' standalone='no'?>\n<root/>"</tt> </tt>
8527 <a name="L2738"></a><tt class="py-lineno">2738</tt> <tt class="py-line"> <tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-2884" class="py-name"><a title="lxml.etree._Element.getroottree" class="py-name" href="#" onclick="return doclink('link-2884', 'getroottree', 'link-1969');">getroottree</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
8528 <a name="L2739"></a><tt class="py-lineno">2739</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-2885" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2885', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2886" class="py-name"><a title="lxml.etree.DocInfo.standalone" class="py-name" href="#" onclick="return doclink('link-2886', 'standalone', 'link-2871');">standalone</a></tt><tt class="py-op">)</tt> </tt>
8529 </div><a name="L2740"></a><tt class="py-lineno">2740</tt> <tt class="py-line"> </tt>
8530 <a name="ETreeOnlyTestCase.test_tostring_standalone"></a><div id="ETreeOnlyTestCase.test_tostring_standalone-def"><a name="L2741"></a><tt class="py-lineno">2741</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_tostring_standalone-toggle" onclick="return toggle('ETreeOnlyTestCase.test_tostring_standalone');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_standalone">test_tostring_standalone</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
8531 </div><div id="ETreeOnlyTestCase.test_tostring_standalone-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_tostring_standalone-expanded"><a name="L2742"></a><tt class="py-lineno">2742</tt> <tt class="py-line"> <tt id="link-2887" class="py-name"><a title="lxml.etree.XSLT.tostring
8533 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2887', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2888" class="py-name"><a title="lxml.etree
8534 lxml.sax.ElementTreeContentHandler.etree
8535 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8536 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8537 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2888', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2889" class="py-name"><a title="lxml.etree.XSLT.tostring
8539 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2889', 'tostring', 'link-597');">tostring</a></tt> </tt>
8540 <a name="L2743"></a><tt class="py-lineno">2743</tt> <tt class="py-line"> <tt id="link-2890" class="py-name"><a title="lxml.etree.XML
8542 lxml.tests.test_objectify.ObjectifyTestCase.XML
8543 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2890', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2891" class="py-name"><a title="lxml.etree
8544 lxml.sax.ElementTreeContentHandler.etree
8545 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8546 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8547 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2891', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2892" class="py-name"><a title="lxml.etree.XML
8549 lxml.tests.test_objectify.ObjectifyTestCase.XML
8550 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2892', 'XML', 'link-217');">XML</a></tt> </tt>
8551 <a name="L2744"></a><tt class="py-lineno">2744</tt> <tt class="py-line"> <tt id="link-2893" class="py-name"><a title="lxml.etree.ElementTree
8552 xml.etree.ElementTree
8553 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-2893', 'ElementTree', 'link-468');">ElementTree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2894" class="py-name"><a title="lxml.etree
8554 lxml.sax.ElementTreeContentHandler.etree
8555 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8556 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8557 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2894', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2895" class="py-name"><a title="lxml.etree.ElementTree
8558 xml.etree.ElementTree
8559 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-2895', 'ElementTree', 'link-468');">ElementTree</a></tt> </tt>
8560 <a name="L2745"></a><tt class="py-lineno">2745</tt> <tt class="py-line"> </tt>
8561 <a name="L2746"></a><tt class="py-lineno">2746</tt> <tt class="py-line"> <tt id="link-2896" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2896', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-2897" class="py-name"><a title="lxml.etree.XML
8563 lxml.tests.test_objectify.ObjectifyTestCase.XML
8564 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2897', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-2898" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2898', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">"<root/>"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8565 <a name="L2747"></a><tt class="py-lineno">2747</tt> <tt class="py-line"> </tt>
8566 <a name="L2748"></a><tt class="py-lineno">2748</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-2899" class="py-name"><a title="lxml.etree.ElementTree
8567 xml.etree.ElementTree
8568 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-2899', 'ElementTree', 'link-468');">ElementTree</a></tt><tt class="py-op">(</tt><tt id="link-2900" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2900', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt> </tt>
8569 <a name="L2749"></a><tt class="py-lineno">2749</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-2901" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2901', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2902" class="py-name"><a title="lxml.etree.DocInfo.standalone" class="py-name" href="#" onclick="return doclink('link-2902', 'standalone', 'link-2871');">standalone</a></tt><tt class="py-op">)</tt> </tt>
8570 <a name="L2750"></a><tt class="py-lineno">2750</tt> <tt class="py-line"> </tt>
8571 <a name="L2751"></a><tt class="py-lineno">2751</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-2903" class="py-name"><a title="lxml.etree.XSLT.tostring
8573 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2903', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt id="link-2904" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2904', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-name">xml_declaration</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> <tt id="link-2905" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-2905', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-string">"ASCII"</tt><tt class="py-op">)</tt> </tt>
8574 <a name="L2752"></a><tt class="py-lineno">2752</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt id="link-2906" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2906', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt> </tt>
8575 <a name="L2753"></a><tt class="py-lineno">2753</tt> <tt class="py-line"> <tt class="py-string">"<?xml version='1.0' encoding='ASCII'?>\n<root/>"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8576 <a name="L2754"></a><tt class="py-lineno">2754</tt> <tt class="py-line"> </tt>
8577 <a name="L2755"></a><tt class="py-lineno">2755</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-2907" class="py-name"><a title="lxml.etree.XSLT.tostring
8579 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2907', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt id="link-2908" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2908', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-name">xml_declaration</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> <tt id="link-2909" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-2909', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-string">"ASCII"</tt><tt class="py-op">,</tt> </tt>
8580 <a name="L2756"></a><tt class="py-lineno">2756</tt> <tt class="py-line"> <tt id="link-2910" class="py-name"><a title="lxml.etree.DocInfo.standalone" class="py-name" href="#" onclick="return doclink('link-2910', 'standalone', 'link-2871');">standalone</a></tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
8581 <a name="L2757"></a><tt class="py-lineno">2757</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt id="link-2911" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2911', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt> </tt>
8582 <a name="L2758"></a><tt class="py-lineno">2758</tt> <tt class="py-line"> <tt class="py-string">"<?xml version='1.0' encoding='ASCII' standalone='yes'?>\n<root/>"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8583 <a name="L2759"></a><tt class="py-lineno">2759</tt> <tt class="py-line"> </tt>
8584 <a name="L2760"></a><tt class="py-lineno">2760</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-2912" class="py-name"><a title="lxml.etree.ElementTree
8585 xml.etree.ElementTree
8586 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-2912', 'ElementTree', 'link-468');">ElementTree</a></tt><tt class="py-op">(</tt><tt id="link-2913" class="py-name"><a title="lxml.etree.XML
8588 lxml.tests.test_objectify.ObjectifyTestCase.XML
8589 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2913', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8590 <a name="L2761"></a><tt class="py-lineno">2761</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-2914" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2914', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2915" class="py-name"><a title="lxml.etree.DocInfo.standalone" class="py-name" href="#" onclick="return doclink('link-2915', 'standalone', 'link-2871');">standalone</a></tt><tt class="py-op">)</tt> </tt>
8591 <a name="L2762"></a><tt class="py-lineno">2762</tt> <tt class="py-line"> </tt>
8592 <a name="L2763"></a><tt class="py-lineno">2763</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-2916" class="py-name"><a title="lxml.etree.XSLT.tostring
8594 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2916', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt id="link-2917" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2917', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-name">xml_declaration</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> <tt id="link-2918" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-2918', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-string">"ASCII"</tt><tt class="py-op">,</tt> </tt>
8595 <a name="L2764"></a><tt class="py-lineno">2764</tt> <tt class="py-line"> <tt id="link-2919" class="py-name"><a title="lxml.etree.DocInfo.standalone" class="py-name" href="#" onclick="return doclink('link-2919', 'standalone', 'link-2871');">standalone</a></tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
8596 <a name="L2765"></a><tt class="py-lineno">2765</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt id="link-2920" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2920', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt> </tt>
8597 <a name="L2766"></a><tt class="py-lineno">2766</tt> <tt class="py-line"> <tt class="py-string">"<?xml version='1.0' encoding='ASCII' standalone='no'?>\n<root/>"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8598 <a name="L2767"></a><tt class="py-lineno">2767</tt> <tt class="py-line"> </tt>
8599 <a name="L2768"></a><tt class="py-lineno">2768</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-2921" class="py-name"><a title="lxml.etree.ElementTree
8600 xml.etree.ElementTree
8601 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-2921', 'ElementTree', 'link-468');">ElementTree</a></tt><tt class="py-op">(</tt><tt id="link-2922" class="py-name"><a title="lxml.etree.XML
8603 lxml.tests.test_objectify.ObjectifyTestCase.XML
8604 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2922', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8605 <a name="L2769"></a><tt class="py-lineno">2769</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-2923" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2923', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2924" class="py-name"><a title="lxml.etree.DocInfo.standalone" class="py-name" href="#" onclick="return doclink('link-2924', 'standalone', 'link-2871');">standalone</a></tt><tt class="py-op">)</tt> </tt>
8606 </div><a name="L2770"></a><tt class="py-lineno">2770</tt> <tt class="py-line"> </tt>
8607 <a name="ETreeOnlyTestCase.test_tostring_standalone_in_out"></a><div id="ETreeOnlyTestCase.test_tostring_standalone_in_out-def"><a name="L2771"></a><tt class="py-lineno">2771</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_tostring_standalone_in_out-toggle" onclick="return toggle('ETreeOnlyTestCase.test_tostring_standalone_in_out');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_standalone_in_out">test_tostring_standalone_in_out</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
8608 </div><div id="ETreeOnlyTestCase.test_tostring_standalone_in_out-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_tostring_standalone_in_out-expanded"><a name="L2772"></a><tt class="py-lineno">2772</tt> <tt class="py-line"> <tt id="link-2925" class="py-name"><a title="lxml.etree.XSLT.tostring
8610 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2925', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2926" class="py-name"><a title="lxml.etree
8611 lxml.sax.ElementTreeContentHandler.etree
8612 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8613 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8614 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2926', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2927" class="py-name"><a title="lxml.etree.XSLT.tostring
8616 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2927', 'tostring', 'link-597');">tostring</a></tt> </tt>
8617 <a name="L2773"></a><tt class="py-lineno">2773</tt> <tt class="py-line"> <tt id="link-2928" class="py-name"><a title="lxml.etree.XML
8619 lxml.tests.test_objectify.ObjectifyTestCase.XML
8620 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2928', 'XML', 'link-217');">XML</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2929" class="py-name"><a title="lxml.etree
8621 lxml.sax.ElementTreeContentHandler.etree
8622 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8623 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8624 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2929', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2930" class="py-name"><a title="lxml.etree.XML
8626 lxml.tests.test_objectify.ObjectifyTestCase.XML
8627 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2930', 'XML', 'link-217');">XML</a></tt> </tt>
8628 <a name="L2774"></a><tt class="py-lineno">2774</tt> <tt class="py-line"> <tt id="link-2931" class="py-name"><a title="lxml.etree.ElementTree
8629 xml.etree.ElementTree
8630 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-2931', 'ElementTree', 'link-468');">ElementTree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2932" class="py-name"><a title="lxml.etree
8631 lxml.sax.ElementTreeContentHandler.etree
8632 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8633 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8634 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2932', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2933" class="py-name"><a title="lxml.etree.ElementTree
8635 xml.etree.ElementTree
8636 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-2933', 'ElementTree', 'link-468');">ElementTree</a></tt> </tt>
8637 <a name="L2775"></a><tt class="py-lineno">2775</tt> <tt class="py-line"> </tt>
8638 <a name="L2776"></a><tt class="py-lineno">2776</tt> <tt class="py-line"> <tt id="link-2934" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2934', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-2935" class="py-name"><a title="lxml.etree.XML
8640 lxml.tests.test_objectify.ObjectifyTestCase.XML
8641 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-2935', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-2936" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2936', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt> </tt>
8642 <a name="L2777"></a><tt class="py-lineno">2777</tt> <tt class="py-line"> <tt class="py-string">"<?xml version='1.0' encoding='UTF-8' standalone='yes'?>\n<root/>"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8643 <a name="L2778"></a><tt class="py-lineno">2778</tt> <tt class="py-line"> </tt>
8644 <a name="L2779"></a><tt class="py-lineno">2779</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-2937" class="py-name"><a title="lxml.etree.ElementTree
8645 xml.etree.ElementTree
8646 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-2937', 'ElementTree', 'link-468');">ElementTree</a></tt><tt class="py-op">(</tt><tt id="link-2938" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2938', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt> </tt>
8647 <a name="L2780"></a><tt class="py-lineno">2780</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-2939" class="py-name"><a title="lxml.etree._ElementTree.docinfo" class="py-name" href="#" onclick="return doclink('link-2939', 'docinfo', 'link-2502');">docinfo</a></tt><tt class="py-op">.</tt><tt id="link-2940" class="py-name"><a title="lxml.etree.DocInfo.standalone" class="py-name" href="#" onclick="return doclink('link-2940', 'standalone', 'link-2871');">standalone</a></tt><tt class="py-op">)</tt> </tt>
8648 <a name="L2781"></a><tt class="py-lineno">2781</tt> <tt class="py-line"> </tt>
8649 <a name="L2782"></a><tt class="py-lineno">2782</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-2941" class="py-name"><a title="lxml.etree.XSLT.tostring
8651 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2941', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt id="link-2942" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2942', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-name">xml_declaration</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> <tt id="link-2943" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-2943', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-string">"ASCII"</tt><tt class="py-op">)</tt> </tt>
8652 <a name="L2783"></a><tt class="py-lineno">2783</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt id="link-2944" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2944', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt> </tt>
8653 <a name="L2784"></a><tt class="py-lineno">2784</tt> <tt class="py-line"> <tt class="py-string">"<?xml version='1.0' encoding='ASCII'?>\n<root/>"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8654 <a name="L2785"></a><tt class="py-lineno">2785</tt> <tt class="py-line"> </tt>
8655 <a name="L2786"></a><tt class="py-lineno">2786</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-2945" class="py-name"><a title="lxml.etree.XSLT.tostring
8657 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2945', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt id="link-2946" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-2946', 'root', 'link-220');">root</a></tt><tt class="py-op">,</tt> <tt class="py-name">xml_declaration</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt> <tt id="link-2947" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-2947', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-string">"ASCII"</tt><tt class="py-op">,</tt> </tt>
8658 <a name="L2787"></a><tt class="py-lineno">2787</tt> <tt class="py-line"> <tt id="link-2948" class="py-name"><a title="lxml.etree.DocInfo.standalone" class="py-name" href="#" onclick="return doclink('link-2948', 'standalone', 'link-2871');">standalone</a></tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
8659 <a name="L2788"></a><tt class="py-lineno">2788</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt id="link-2949" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-2949', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt> </tt>
8660 <a name="L2789"></a><tt class="py-lineno">2789</tt> <tt class="py-line"> <tt class="py-string">"<?xml version='1.0' encoding='ASCII' standalone='yes'?>\n<root/>"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8661 </div><a name="L2790"></a><tt class="py-lineno">2790</tt> <tt class="py-line"> </tt>
8662 <a name="ETreeOnlyTestCase.test_tostring_method_text_encoding"></a><div id="ETreeOnlyTestCase.test_tostring_method_text_encoding-def"><a name="L2791"></a><tt class="py-lineno">2791</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_tostring_method_text_encoding-toggle" onclick="return toggle('ETreeOnlyTestCase.test_tostring_method_text_encoding');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_method_text_encoding">test_tostring_method_text_encoding</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
8663 </div><div id="ETreeOnlyTestCase.test_tostring_method_text_encoding-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_tostring_method_text_encoding-expanded"><a name="L2792"></a><tt class="py-lineno">2792</tt> <tt class="py-line"> <tt id="link-2950" class="py-name"><a title="lxml.etree.XSLT.tostring
8665 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2950', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2951" class="py-name"><a title="lxml.etree
8666 lxml.sax.ElementTreeContentHandler.etree
8667 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8668 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8669 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2951', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2952" class="py-name"><a title="lxml.etree.XSLT.tostring
8671 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2952', 'tostring', 'link-597');">tostring</a></tt> </tt>
8672 <a name="L2793"></a><tt class="py-lineno">2793</tt> <tt class="py-line"> <tt id="link-2953" class="py-name"><a title="lxml.cssselect.Element
8675 lxml.objectify.Element
8676 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8677 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2953', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2954" class="py-name"><a title="lxml.etree
8678 lxml.sax.ElementTreeContentHandler.etree
8679 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8680 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8681 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2954', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2955" class="py-name"><a title="lxml.cssselect.Element
8684 lxml.objectify.Element
8685 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8686 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2955', 'Element', 'link-69');">Element</a></tt> </tt>
8687 <a name="L2794"></a><tt class="py-lineno">2794</tt> <tt class="py-line"> <tt id="link-2956" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2956', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2957" class="py-name"><a title="lxml.etree
8688 lxml.sax.ElementTreeContentHandler.etree
8689 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8690 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8691 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2957', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2958" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2958', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
8692 <a name="L2795"></a><tt class="py-lineno">2795</tt> <tt class="py-line"> </tt>
8693 <a name="L2796"></a><tt class="py-lineno">2796</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-2959" class="py-name"><a title="lxml.cssselect.Element
8696 lxml.objectify.Element
8697 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8698 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2959', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
8699 <a name="L2797"></a><tt class="py-lineno">2797</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-2960" class="py-name"><a title="lxml.etree.QName.text
8700 lxml.etree._AppendOnlyElementProxy.text
8701 lxml.etree._Element.text
8702 lxml.etree._Entity.text
8703 lxml.etree._ModifyContentOnlyProxy.text
8704 lxml.etree._ReadOnlyEntityProxy.text
8705 lxml.etree._ReadOnlyProxy.text
8706 lxml.etree.__ContentOnlyElement.text
8707 lxml.objectify.ObjectifiedElement.text
8708 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-2960', 'text', 'link-194');">text</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"A"</tt> </tt>
8709 <a name="L2798"></a><tt class="py-lineno">2798</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-2961" class="py-name"><a title="lxml.etree._Element.tail
8710 lxml.etree._ReadOnlyProxy.tail
8711 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-2961', 'tail', 'link-850');">tail</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"tail"</tt> </tt>
8712 <a name="L2799"></a><tt class="py-lineno">2799</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-2962" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2962', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
8713 <a name="L2800"></a><tt class="py-lineno">2800</tt> <tt class="py-line"> <tt class="py-name">b</tt><tt class="py-op">.</tt><tt id="link-2963" class="py-name"><a title="lxml.etree.QName.text
8714 lxml.etree._AppendOnlyElementProxy.text
8715 lxml.etree._Element.text
8716 lxml.etree._Entity.text
8717 lxml.etree._ModifyContentOnlyProxy.text
8718 lxml.etree._ReadOnlyEntityProxy.text
8719 lxml.etree._ReadOnlyProxy.text
8720 lxml.etree.__ContentOnlyElement.text
8721 lxml.objectify.ObjectifiedElement.text
8722 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-2963', 'text', 'link-194');">text</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"B"</tt> </tt>
8723 <a name="L2801"></a><tt class="py-lineno">2801</tt> <tt class="py-line"> <tt class="py-name">b</tt><tt class="py-op">.</tt><tt id="link-2964" class="py-name"><a title="lxml.etree._Element.tail
8724 lxml.etree._ReadOnlyProxy.tail
8725 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-2964', 'tail', 'link-850');">tail</a></tt> <tt class="py-op">=</tt> <tt id="link-2965" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-2965', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">"Søk på nettet"</tt><tt class="py-op">)</tt> </tt>
8726 <a name="L2802"></a><tt class="py-lineno">2802</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-2966" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2966', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
8727 <a name="L2803"></a><tt class="py-lineno">2803</tt> <tt class="py-line"> <tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-2967" class="py-name"><a title="lxml.etree.QName.text
8728 lxml.etree._AppendOnlyElementProxy.text
8729 lxml.etree._Element.text
8730 lxml.etree._Entity.text
8731 lxml.etree._ModifyContentOnlyProxy.text
8732 lxml.etree._ReadOnlyEntityProxy.text
8733 lxml.etree._ReadOnlyProxy.text
8734 lxml.etree.__ContentOnlyElement.text
8735 lxml.objectify.ObjectifiedElement.text
8736 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-2967', 'text', 'link-194');">text</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"C"</tt> </tt>
8737 <a name="L2804"></a><tt class="py-lineno">2804</tt> <tt class="py-line"> </tt>
8738 <a name="L2805"></a><tt class="py-lineno">2805</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-2968" class="py-name"><a title="lxml.etree.XSLT.tostring
8740 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2968', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt id="link-2969" class="py-name" targets="Variable lxml.html.FormElement.method=lxml.html.FormElement-class.html#method"><a title="lxml.html.FormElement.method" class="py-name" href="#" onclick="return doclink('link-2969', 'method', 'link-2969');">method</a></tt><tt class="py-op">=</tt><tt class="py-string">"text"</tt><tt class="py-op">,</tt> <tt id="link-2970" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-2970', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-string">"UTF-16"</tt><tt class="py-op">)</tt> </tt>
8741 <a name="L2806"></a><tt class="py-lineno">2806</tt> <tt class="py-line"> </tt>
8742 <a name="L2807"></a><tt class="py-lineno">2807</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-2971" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-2971', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'ABSøk på nettetCtail'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">encode</tt><tt class="py-op">(</tt><tt class="py-string">"UTF-16"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
8743 <a name="L2808"></a><tt class="py-lineno">2808</tt> <tt class="py-line"> <tt class="py-name">result</tt><tt class="py-op">)</tt> </tt>
8744 </div><a name="L2809"></a><tt class="py-lineno">2809</tt> <tt class="py-line"> </tt>
8745 <a name="ETreeOnlyTestCase.test_tostring_method_text_unicode"></a><div id="ETreeOnlyTestCase.test_tostring_method_text_unicode-def"><a name="L2810"></a><tt class="py-lineno">2810</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_tostring_method_text_unicode-toggle" onclick="return toggle('ETreeOnlyTestCase.test_tostring_method_text_unicode');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_method_text_unicode">test_tostring_method_text_unicode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
8746 </div><div id="ETreeOnlyTestCase.test_tostring_method_text_unicode-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_tostring_method_text_unicode-expanded"><a name="L2811"></a><tt class="py-lineno">2811</tt> <tt class="py-line"> <tt id="link-2972" class="py-name"><a title="lxml.etree.XSLT.tostring
8748 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2972', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2973" class="py-name"><a title="lxml.etree
8749 lxml.sax.ElementTreeContentHandler.etree
8750 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8751 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8752 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2973', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2974" class="py-name"><a title="lxml.etree.XSLT.tostring
8754 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2974', 'tostring', 'link-597');">tostring</a></tt> </tt>
8755 <a name="L2812"></a><tt class="py-lineno">2812</tt> <tt class="py-line"> <tt id="link-2975" class="py-name"><a title="lxml.cssselect.Element
8758 lxml.objectify.Element
8759 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8760 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2975', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2976" class="py-name"><a title="lxml.etree
8761 lxml.sax.ElementTreeContentHandler.etree
8762 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8763 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8764 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2976', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2977" class="py-name"><a title="lxml.cssselect.Element
8767 lxml.objectify.Element
8768 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8769 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2977', 'Element', 'link-69');">Element</a></tt> </tt>
8770 <a name="L2813"></a><tt class="py-lineno">2813</tt> <tt class="py-line"> <tt id="link-2978" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2978', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2979" class="py-name"><a title="lxml.etree
8771 lxml.sax.ElementTreeContentHandler.etree
8772 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8773 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8774 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2979', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2980" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2980', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
8775 <a name="L2814"></a><tt class="py-lineno">2814</tt> <tt class="py-line"> </tt>
8776 <a name="L2815"></a><tt class="py-lineno">2815</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-2981" class="py-name"><a title="lxml.cssselect.Element
8779 lxml.objectify.Element
8780 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8781 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-2981', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
8782 <a name="L2816"></a><tt class="py-lineno">2816</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-2982" class="py-name"><a title="lxml.etree.QName.text
8783 lxml.etree._AppendOnlyElementProxy.text
8784 lxml.etree._Element.text
8785 lxml.etree._Entity.text
8786 lxml.etree._ModifyContentOnlyProxy.text
8787 lxml.etree._ReadOnlyEntityProxy.text
8788 lxml.etree._ReadOnlyProxy.text
8789 lxml.etree.__ContentOnlyElement.text
8790 lxml.objectify.ObjectifiedElement.text
8791 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-2982', 'text', 'link-194');">text</a></tt> <tt class="py-op">=</tt> <tt id="link-2983" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-2983', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'Søk på nettetA'</tt><tt class="py-op">)</tt> </tt>
8792 <a name="L2817"></a><tt class="py-lineno">2817</tt> <tt class="py-line"> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-2984" class="py-name"><a title="lxml.etree._Element.tail
8793 lxml.etree._ReadOnlyProxy.tail
8794 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-2984', 'tail', 'link-850');">tail</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"tail"</tt> </tt>
8795 <a name="L2818"></a><tt class="py-lineno">2818</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-2985" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2985', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
8796 <a name="L2819"></a><tt class="py-lineno">2819</tt> <tt class="py-line"> <tt class="py-name">b</tt><tt class="py-op">.</tt><tt id="link-2986" class="py-name"><a title="lxml.etree.QName.text
8797 lxml.etree._AppendOnlyElementProxy.text
8798 lxml.etree._Element.text
8799 lxml.etree._Entity.text
8800 lxml.etree._ModifyContentOnlyProxy.text
8801 lxml.etree._ReadOnlyEntityProxy.text
8802 lxml.etree._ReadOnlyProxy.text
8803 lxml.etree.__ContentOnlyElement.text
8804 lxml.objectify.ObjectifiedElement.text
8805 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-2986', 'text', 'link-194');">text</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"B"</tt> </tt>
8806 <a name="L2820"></a><tt class="py-lineno">2820</tt> <tt class="py-line"> <tt class="py-name">b</tt><tt class="py-op">.</tt><tt id="link-2987" class="py-name"><a title="lxml.etree._Element.tail
8807 lxml.etree._ReadOnlyProxy.tail
8808 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-2987', 'tail', 'link-850');">tail</a></tt> <tt class="py-op">=</tt> <tt id="link-2988" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-2988', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'Søk på nettetB'</tt><tt class="py-op">)</tt> </tt>
8809 <a name="L2821"></a><tt class="py-lineno">2821</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-2989" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-2989', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
8810 <a name="L2822"></a><tt class="py-lineno">2822</tt> <tt class="py-line"> <tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-2990" class="py-name"><a title="lxml.etree.QName.text
8811 lxml.etree._AppendOnlyElementProxy.text
8812 lxml.etree._Element.text
8813 lxml.etree._Entity.text
8814 lxml.etree._ModifyContentOnlyProxy.text
8815 lxml.etree._ReadOnlyEntityProxy.text
8816 lxml.etree._ReadOnlyProxy.text
8817 lxml.etree.__ContentOnlyElement.text
8818 lxml.objectify.ObjectifiedElement.text
8819 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-2990', 'text', 'link-194');">text</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"C"</tt> </tt>
8820 <a name="L2823"></a><tt class="py-lineno">2823</tt> <tt class="py-line"> </tt>
8821 <a name="L2824"></a><tt class="py-lineno">2824</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">UnicodeEncodeError</tt><tt class="py-op">,</tt> </tt>
8822 <a name="L2825"></a><tt class="py-lineno">2825</tt> <tt class="py-line"> <tt id="link-2991" class="py-name"><a title="lxml.etree.XSLT.tostring
8824 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2991', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt id="link-2992" class="py-name"><a title="lxml.html.FormElement.method" class="py-name" href="#" onclick="return doclink('link-2992', 'method', 'link-2969');">method</a></tt><tt class="py-op">=</tt><tt class="py-string">"text"</tt><tt class="py-op">)</tt> </tt>
8825 <a name="L2826"></a><tt class="py-lineno">2826</tt> <tt class="py-line"> </tt>
8826 <a name="L2827"></a><tt class="py-lineno">2827</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
8827 <a name="L2828"></a><tt class="py-lineno">2828</tt> <tt class="py-line"> <tt id="link-2993" class="py-name"><a title="lxml.tests.common_imports._str" class="py-name" href="#" onclick="return doclink('link-2993', '_str', 'link-20');">_str</a></tt><tt class="py-op">(</tt><tt class="py-string">'Søk på nettetABSøk på nettetBCtail'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">encode</tt><tt class="py-op">(</tt><tt class="py-string">'utf-8'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
8828 <a name="L2829"></a><tt class="py-lineno">2829</tt> <tt class="py-line"> <tt id="link-2994" class="py-name"><a title="lxml.etree.XSLT.tostring
8830 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-2994', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt id="link-2995" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-2995', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-string">"UTF-8"</tt><tt class="py-op">,</tt> <tt id="link-2996" class="py-name"><a title="lxml.html.FormElement.method" class="py-name" href="#" onclick="return doclink('link-2996', 'method', 'link-2969');">method</a></tt><tt class="py-op">=</tt><tt class="py-string">"text"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8831 </div><a name="L2830"></a><tt class="py-lineno">2830</tt> <tt class="py-line"> </tt>
8832 <a name="ETreeOnlyTestCase.test_tounicode"></a><div id="ETreeOnlyTestCase.test_tounicode-def"><a name="L2831"></a><tt class="py-lineno">2831</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_tounicode-toggle" onclick="return toggle('ETreeOnlyTestCase.test_tounicode');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tounicode">test_tounicode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
8833 </div><div id="ETreeOnlyTestCase.test_tounicode-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_tounicode-expanded"><a name="L2832"></a><tt class="py-lineno">2832</tt> <tt class="py-line"> <tt id="link-2997" class="py-name" targets="Function lxml.etree.tounicode()=lxml.etree-module.html#tounicode"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-2997', 'tounicode', 'link-2997');">tounicode</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2998" class="py-name"><a title="lxml.etree
8834 lxml.sax.ElementTreeContentHandler.etree
8835 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8836 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8837 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-2998', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-2999" class="py-name"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-2999', 'tounicode', 'link-2997');">tounicode</a></tt> </tt>
8838 <a name="L2833"></a><tt class="py-lineno">2833</tt> <tt class="py-line"> <tt id="link-3000" class="py-name"><a title="lxml.cssselect.Element
8841 lxml.objectify.Element
8842 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8843 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3000', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3001" class="py-name"><a title="lxml.etree
8844 lxml.sax.ElementTreeContentHandler.etree
8845 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8846 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8847 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3001', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3002" class="py-name"><a title="lxml.cssselect.Element
8850 lxml.objectify.Element
8851 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8852 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3002', 'Element', 'link-69');">Element</a></tt> </tt>
8853 <a name="L2834"></a><tt class="py-lineno">2834</tt> <tt class="py-line"> <tt id="link-3003" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3003', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3004" class="py-name"><a title="lxml.etree
8854 lxml.sax.ElementTreeContentHandler.etree
8855 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8856 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8857 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3004', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3005" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3005', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
8858 <a name="L2835"></a><tt class="py-lineno">2835</tt> <tt class="py-line"> </tt>
8859 <a name="L2836"></a><tt class="py-lineno">2836</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-3006" class="py-name"><a title="lxml.cssselect.Element
8862 lxml.objectify.Element
8863 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8864 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3006', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
8865 <a name="L2837"></a><tt class="py-lineno">2837</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-3007" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3007', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
8866 <a name="L2838"></a><tt class="py-lineno">2838</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-3008" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3008', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
8867 <a name="L2839"></a><tt class="py-lineno">2839</tt> <tt class="py-line"> </tt>
8868 <a name="L2840"></a><tt class="py-lineno">2840</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3009" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-3009', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-3010" class="py-name"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-3010', 'tounicode', 'link-2997');">tounicode</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">_unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8869 <a name="L2841"></a><tt class="py-lineno">2841</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3011" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3011', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b></b><c></c></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
8870 <a name="L2842"></a><tt class="py-lineno">2842</tt> <tt class="py-line"> <tt id="link-3012" class="py-name"><a title="lxml.tests.common_imports.canonicalize" class="py-name" href="#" onclick="return doclink('link-3012', 'canonicalize', 'link-19');">canonicalize</a></tt><tt class="py-op">(</tt><tt id="link-3013" class="py-name"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-3013', 'tounicode', 'link-2997');">tounicode</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8871 </div><a name="L2843"></a><tt class="py-lineno">2843</tt> <tt class="py-line"> </tt>
8872 <a name="ETreeOnlyTestCase.test_tounicode_element"></a><div id="ETreeOnlyTestCase.test_tounicode_element-def"><a name="L2844"></a><tt class="py-lineno">2844</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_tounicode_element-toggle" onclick="return toggle('ETreeOnlyTestCase.test_tounicode_element');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tounicode_element">test_tounicode_element</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
8873 </div><div id="ETreeOnlyTestCase.test_tounicode_element-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_tounicode_element-expanded"><a name="L2845"></a><tt class="py-lineno">2845</tt> <tt class="py-line"> <tt id="link-3014" class="py-name"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-3014', 'tounicode', 'link-2997');">tounicode</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3015" class="py-name"><a title="lxml.etree
8874 lxml.sax.ElementTreeContentHandler.etree
8875 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8876 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8877 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3015', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3016" class="py-name"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-3016', 'tounicode', 'link-2997');">tounicode</a></tt> </tt>
8878 <a name="L2846"></a><tt class="py-lineno">2846</tt> <tt class="py-line"> <tt id="link-3017" class="py-name"><a title="lxml.cssselect.Element
8881 lxml.objectify.Element
8882 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8883 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3017', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3018" class="py-name"><a title="lxml.etree
8884 lxml.sax.ElementTreeContentHandler.etree
8885 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8886 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8887 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3018', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3019" class="py-name"><a title="lxml.cssselect.Element
8890 lxml.objectify.Element
8891 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8892 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3019', 'Element', 'link-69');">Element</a></tt> </tt>
8893 <a name="L2847"></a><tt class="py-lineno">2847</tt> <tt class="py-line"> <tt id="link-3020" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3020', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3021" class="py-name"><a title="lxml.etree
8894 lxml.sax.ElementTreeContentHandler.etree
8895 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8896 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8897 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3021', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3022" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3022', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
8898 <a name="L2848"></a><tt class="py-lineno">2848</tt> <tt class="py-line"> </tt>
8899 <a name="L2849"></a><tt class="py-lineno">2849</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-3023" class="py-name"><a title="lxml.cssselect.Element
8902 lxml.objectify.Element
8903 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8904 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3023', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
8905 <a name="L2850"></a><tt class="py-lineno">2850</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-3024" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3024', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
8906 <a name="L2851"></a><tt class="py-lineno">2851</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-3025" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3025', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
8907 <a name="L2852"></a><tt class="py-lineno">2852</tt> <tt class="py-line"> <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt id="link-3026" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3026', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-string">'d'</tt><tt class="py-op">)</tt> </tt>
8908 <a name="L2853"></a><tt class="py-lineno">2853</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3027" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-3027', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-3028" class="py-name"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-3028', 'tounicode', 'link-2997');">tounicode</a></tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">_unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8909 <a name="L2854"></a><tt class="py-lineno">2854</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3029" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-3029', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-3030" class="py-name"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-3030', 'tounicode', 'link-2997');">tounicode</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">_unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8910 <a name="L2855"></a><tt class="py-lineno">2855</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3031" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3031', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<b></b>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
8911 <a name="L2856"></a><tt class="py-lineno">2856</tt> <tt class="py-line"> <tt id="link-3032" class="py-name"><a title="lxml.tests.common_imports.canonicalize" class="py-name" href="#" onclick="return doclink('link-3032', 'canonicalize', 'link-19');">canonicalize</a></tt><tt class="py-op">(</tt><tt id="link-3033" class="py-name"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-3033', 'tounicode', 'link-2997');">tounicode</a></tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8912 <a name="L2857"></a><tt class="py-lineno">2857</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3034" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3034', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<c><d></d></c>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
8913 <a name="L2858"></a><tt class="py-lineno">2858</tt> <tt class="py-line"> <tt id="link-3035" class="py-name"><a title="lxml.tests.common_imports.canonicalize" class="py-name" href="#" onclick="return doclink('link-3035', 'canonicalize', 'link-19');">canonicalize</a></tt><tt class="py-op">(</tt><tt id="link-3036" class="py-name"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-3036', 'tounicode', 'link-2997');">tounicode</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8914 </div><a name="L2859"></a><tt class="py-lineno">2859</tt> <tt class="py-line"> </tt>
8915 <a name="ETreeOnlyTestCase.test_tounicode_none"></a><div id="ETreeOnlyTestCase.test_tounicode_none-def"><a name="L2860"></a><tt class="py-lineno">2860</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_tounicode_none-toggle" onclick="return toggle('ETreeOnlyTestCase.test_tounicode_none');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tounicode_none">test_tounicode_none</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
8916 </div><div id="ETreeOnlyTestCase.test_tounicode_none-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_tounicode_none-expanded"><a name="L2861"></a><tt class="py-lineno">2861</tt> <tt class="py-line"> <tt id="link-3037" class="py-name"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-3037', 'tounicode', 'link-2997');">tounicode</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3038" class="py-name"><a title="lxml.etree
8917 lxml.sax.ElementTreeContentHandler.etree
8918 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8919 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8920 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3038', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3039" class="py-name"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-3039', 'tounicode', 'link-2997');">tounicode</a></tt> </tt>
8921 <a name="L2862"></a><tt class="py-lineno">2862</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">TypeError</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3040" class="py-name"><a title="lxml.etree
8922 lxml.sax.ElementTreeContentHandler.etree
8923 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8924 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8925 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3040', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3041" class="py-name"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-3041', 'tounicode', 'link-2997');">tounicode</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
8926 </div><a name="L2863"></a><tt class="py-lineno">2863</tt> <tt class="py-line"> </tt>
8927 <a name="ETreeOnlyTestCase.test_tounicode_element_tail"></a><div id="ETreeOnlyTestCase.test_tounicode_element_tail-def"><a name="L2864"></a><tt class="py-lineno">2864</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_tounicode_element_tail-toggle" onclick="return toggle('ETreeOnlyTestCase.test_tounicode_element_tail');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tounicode_element_tail">test_tounicode_element_tail</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
8928 </div><div id="ETreeOnlyTestCase.test_tounicode_element_tail-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_tounicode_element_tail-expanded"><a name="L2865"></a><tt class="py-lineno">2865</tt> <tt class="py-line"> <tt id="link-3042" class="py-name"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-3042', 'tounicode', 'link-2997');">tounicode</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3043" class="py-name"><a title="lxml.etree
8929 lxml.sax.ElementTreeContentHandler.etree
8930 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8931 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8932 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3043', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3044" class="py-name"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-3044', 'tounicode', 'link-2997');">tounicode</a></tt> </tt>
8933 <a name="L2866"></a><tt class="py-lineno">2866</tt> <tt class="py-line"> <tt id="link-3045" class="py-name"><a title="lxml.cssselect.Element
8936 lxml.objectify.Element
8937 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8938 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3045', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3046" class="py-name"><a title="lxml.etree
8939 lxml.sax.ElementTreeContentHandler.etree
8940 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8941 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8942 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3046', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3047" class="py-name"><a title="lxml.cssselect.Element
8945 lxml.objectify.Element
8946 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8947 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3047', 'Element', 'link-69');">Element</a></tt> </tt>
8948 <a name="L2867"></a><tt class="py-lineno">2867</tt> <tt class="py-line"> <tt id="link-3048" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3048', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3049" class="py-name"><a title="lxml.etree
8949 lxml.sax.ElementTreeContentHandler.etree
8950 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8951 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8952 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3049', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3050" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3050', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
8953 <a name="L2868"></a><tt class="py-lineno">2868</tt> <tt class="py-line"> </tt>
8954 <a name="L2869"></a><tt class="py-lineno">2869</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-3051" class="py-name"><a title="lxml.cssselect.Element
8957 lxml.objectify.Element
8958 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8959 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3051', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
8960 <a name="L2870"></a><tt class="py-lineno">2870</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-3052" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3052', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
8961 <a name="L2871"></a><tt class="py-lineno">2871</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-3053" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3053', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
8962 <a name="L2872"></a><tt class="py-lineno">2872</tt> <tt class="py-line"> <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt id="link-3054" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3054', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-string">'d'</tt><tt class="py-op">)</tt> </tt>
8963 <a name="L2873"></a><tt class="py-lineno">2873</tt> <tt class="py-line"> <tt class="py-name">b</tt><tt class="py-op">.</tt><tt id="link-3055" class="py-name"><a title="lxml.etree._Element.tail
8964 lxml.etree._ReadOnlyProxy.tail
8965 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-3055', 'tail', 'link-850');">tail</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'Foo'</tt> </tt>
8966 <a name="L2874"></a><tt class="py-lineno">2874</tt> <tt class="py-line"> </tt>
8967 <a name="L2875"></a><tt class="py-lineno">2875</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3056" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-3056', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-3057" class="py-name"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-3057', 'tounicode', 'link-2997');">tounicode</a></tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">_unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
8968 <a name="L2876"></a><tt class="py-lineno">2876</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3058" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-3058', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt id="link-3059" class="py-name"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-3059', 'tounicode', 'link-2997');">tounicode</a></tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'<b/>Foo'</tt> <tt class="py-keyword">or</tt> </tt>
8969 <a name="L2877"></a><tt class="py-lineno">2877</tt> <tt class="py-line"> <tt id="link-3060" class="py-name"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-3060', 'tounicode', 'link-2997');">tounicode</a></tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'<b />Foo'</tt><tt class="py-op">)</tt> </tt>
8970 </div><a name="L2878"></a><tt class="py-lineno">2878</tt> <tt class="py-line"> </tt>
8971 <a name="ETreeOnlyTestCase.test_tounicode_pretty"></a><div id="ETreeOnlyTestCase.test_tounicode_pretty-def"><a name="L2879"></a><tt class="py-lineno">2879</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_tounicode_pretty-toggle" onclick="return toggle('ETreeOnlyTestCase.test_tounicode_pretty');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tounicode_pretty">test_tounicode_pretty</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
8972 </div><div id="ETreeOnlyTestCase.test_tounicode_pretty-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_tounicode_pretty-expanded"><a name="L2880"></a><tt class="py-lineno">2880</tt> <tt class="py-line"> <tt id="link-3061" class="py-name"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-3061', 'tounicode', 'link-2997');">tounicode</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3062" class="py-name"><a title="lxml.etree
8973 lxml.sax.ElementTreeContentHandler.etree
8974 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8975 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8976 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3062', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3063" class="py-name"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-3063', 'tounicode', 'link-2997');">tounicode</a></tt> </tt>
8977 <a name="L2881"></a><tt class="py-lineno">2881</tt> <tt class="py-line"> <tt id="link-3064" class="py-name"><a title="lxml.cssselect.Element
8980 lxml.objectify.Element
8981 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8982 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3064', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3065" class="py-name"><a title="lxml.etree
8983 lxml.sax.ElementTreeContentHandler.etree
8984 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8985 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8986 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3065', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3066" class="py-name"><a title="lxml.cssselect.Element
8989 lxml.objectify.Element
8990 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
8991 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3066', 'Element', 'link-69');">Element</a></tt> </tt>
8992 <a name="L2882"></a><tt class="py-lineno">2882</tt> <tt class="py-line"> <tt id="link-3067" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3067', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3068" class="py-name"><a title="lxml.etree
8993 lxml.sax.ElementTreeContentHandler.etree
8994 lxml.tests.test_elementtree.CElementTreeTestCase.etree
8995 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
8996 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3068', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3069" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3069', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
8997 <a name="L2883"></a><tt class="py-lineno">2883</tt> <tt class="py-line"> </tt>
8998 <a name="L2884"></a><tt class="py-lineno">2884</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-3070" class="py-name"><a title="lxml.cssselect.Element
9001 lxml.objectify.Element
9002 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
9003 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3070', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
9004 <a name="L2885"></a><tt class="py-lineno">2885</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-3071" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3071', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
9005 <a name="L2886"></a><tt class="py-lineno">2886</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-3072" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3072', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
9006 <a name="L2887"></a><tt class="py-lineno">2887</tt> <tt class="py-line"> </tt>
9007 <a name="L2888"></a><tt class="py-lineno">2888</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-3073" class="py-name"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-3073', 'tounicode', 'link-2997');">tounicode</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">)</tt> </tt>
9008 <a name="L2889"></a><tt class="py-lineno">2889</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt class="py-string">"<a><b/><c/></a>"</tt><tt class="py-op">)</tt> </tt>
9009 <a name="L2890"></a><tt class="py-lineno">2890</tt> <tt class="py-line"> </tt>
9010 <a name="L2891"></a><tt class="py-lineno">2891</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-3074" class="py-name"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-3074', 'tounicode', 'link-2997');">tounicode</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-name">pretty_print</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
9011 <a name="L2892"></a><tt class="py-lineno">2892</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt class="py-string">"<a><b/><c/></a>"</tt><tt class="py-op">)</tt> </tt>
9012 <a name="L2893"></a><tt class="py-lineno">2893</tt> <tt class="py-line"> </tt>
9013 <a name="L2894"></a><tt class="py-lineno">2894</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-3075" class="py-name"><a title="lxml.etree.tounicode" class="py-name" href="#" onclick="return doclink('link-3075', 'tounicode', 'link-2997');">tounicode</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-name">pretty_print</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
9014 <a name="L2895"></a><tt class="py-lineno">2895</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt class="py-string">"<a>\n <b/>\n <c/>\n</a>\n"</tt><tt class="py-op">)</tt> </tt>
9015 </div><a name="L2896"></a><tt class="py-lineno">2896</tt> <tt class="py-line"> </tt>
9016 <a name="ETreeOnlyTestCase.test_tostring_unicode"></a><div id="ETreeOnlyTestCase.test_tostring_unicode-def"><a name="L2897"></a><tt class="py-lineno">2897</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_tostring_unicode-toggle" onclick="return toggle('ETreeOnlyTestCase.test_tostring_unicode');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_unicode">test_tostring_unicode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9017 </div><div id="ETreeOnlyTestCase.test_tostring_unicode-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_tostring_unicode-expanded"><a name="L2898"></a><tt class="py-lineno">2898</tt> <tt class="py-line"> <tt id="link-3076" class="py-name"><a title="lxml.etree.XSLT.tostring
9019 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3076', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3077" class="py-name"><a title="lxml.etree
9020 lxml.sax.ElementTreeContentHandler.etree
9021 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9022 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9023 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3077', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3078" class="py-name"><a title="lxml.etree.XSLT.tostring
9025 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3078', 'tostring', 'link-597');">tostring</a></tt> </tt>
9026 <a name="L2899"></a><tt class="py-lineno">2899</tt> <tt class="py-line"> <tt id="link-3079" class="py-name"><a title="lxml.cssselect.Element
9029 lxml.objectify.Element
9030 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
9031 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3079', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3080" class="py-name"><a title="lxml.etree
9032 lxml.sax.ElementTreeContentHandler.etree
9033 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9034 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9035 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3080', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3081" class="py-name"><a title="lxml.cssselect.Element
9038 lxml.objectify.Element
9039 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
9040 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3081', 'Element', 'link-69');">Element</a></tt> </tt>
9041 <a name="L2900"></a><tt class="py-lineno">2900</tt> <tt class="py-line"> <tt id="link-3082" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3082', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3083" class="py-name"><a title="lxml.etree
9042 lxml.sax.ElementTreeContentHandler.etree
9043 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9044 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9045 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3083', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3084" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3084', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
9046 <a name="L2901"></a><tt class="py-lineno">2901</tt> <tt class="py-line"> </tt>
9047 <a name="L2902"></a><tt class="py-lineno">2902</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-3085" class="py-name"><a title="lxml.cssselect.Element
9050 lxml.objectify.Element
9051 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
9052 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3085', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
9053 <a name="L2903"></a><tt class="py-lineno">2903</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-3086" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3086', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
9054 <a name="L2904"></a><tt class="py-lineno">2904</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-3087" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3087', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
9055 <a name="L2905"></a><tt class="py-lineno">2905</tt> <tt class="py-line"> </tt>
9056 <a name="L2906"></a><tt class="py-lineno">2906</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3088" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-3088', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-3089" class="py-name"><a title="lxml.etree.XSLT.tostring
9058 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3089', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt id="link-3090" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-3090', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-name">_unicode</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">_unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9059 <a name="L2907"></a><tt class="py-lineno">2907</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3091" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3091', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b></b><c></c></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9060 <a name="L2908"></a><tt class="py-lineno">2908</tt> <tt class="py-line"> <tt id="link-3092" class="py-name"><a title="lxml.tests.common_imports.canonicalize" class="py-name" href="#" onclick="return doclink('link-3092', 'canonicalize', 'link-19');">canonicalize</a></tt><tt class="py-op">(</tt><tt id="link-3093" class="py-name"><a title="lxml.etree.XSLT.tostring
9062 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3093', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt id="link-3094" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-3094', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-name">_unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9063 </div><a name="L2909"></a><tt class="py-lineno">2909</tt> <tt class="py-line"> </tt>
9064 <a name="ETreeOnlyTestCase.test_tostring_unicode_element"></a><div id="ETreeOnlyTestCase.test_tostring_unicode_element-def"><a name="L2910"></a><tt class="py-lineno">2910</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_tostring_unicode_element-toggle" onclick="return toggle('ETreeOnlyTestCase.test_tostring_unicode_element');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_unicode_element">test_tostring_unicode_element</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9065 </div><div id="ETreeOnlyTestCase.test_tostring_unicode_element-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_tostring_unicode_element-expanded"><a name="L2911"></a><tt class="py-lineno">2911</tt> <tt class="py-line"> <tt id="link-3095" class="py-name"><a title="lxml.etree.XSLT.tostring
9067 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3095', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3096" class="py-name"><a title="lxml.etree
9068 lxml.sax.ElementTreeContentHandler.etree
9069 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9070 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9071 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3096', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3097" class="py-name"><a title="lxml.etree.XSLT.tostring
9073 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3097', 'tostring', 'link-597');">tostring</a></tt> </tt>
9074 <a name="L2912"></a><tt class="py-lineno">2912</tt> <tt class="py-line"> <tt id="link-3098" class="py-name"><a title="lxml.cssselect.Element
9077 lxml.objectify.Element
9078 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
9079 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3098', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3099" class="py-name"><a title="lxml.etree
9080 lxml.sax.ElementTreeContentHandler.etree
9081 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9082 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9083 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3099', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3100" class="py-name"><a title="lxml.cssselect.Element
9086 lxml.objectify.Element
9087 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
9088 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3100', 'Element', 'link-69');">Element</a></tt> </tt>
9089 <a name="L2913"></a><tt class="py-lineno">2913</tt> <tt class="py-line"> <tt id="link-3101" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3101', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3102" class="py-name"><a title="lxml.etree
9090 lxml.sax.ElementTreeContentHandler.etree
9091 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9092 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9093 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3102', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3103" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3103', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
9094 <a name="L2914"></a><tt class="py-lineno">2914</tt> <tt class="py-line"> </tt>
9095 <a name="L2915"></a><tt class="py-lineno">2915</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-3104" class="py-name"><a title="lxml.cssselect.Element
9098 lxml.objectify.Element
9099 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
9100 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3104', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
9101 <a name="L2916"></a><tt class="py-lineno">2916</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-3105" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3105', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
9102 <a name="L2917"></a><tt class="py-lineno">2917</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-3106" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3106', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
9103 <a name="L2918"></a><tt class="py-lineno">2918</tt> <tt class="py-line"> <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt id="link-3107" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3107', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-string">'d'</tt><tt class="py-op">)</tt> </tt>
9104 <a name="L2919"></a><tt class="py-lineno">2919</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3108" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-3108', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-3109" class="py-name"><a title="lxml.etree.XSLT.tostring
9106 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3109', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">,</tt> <tt id="link-3110" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-3110', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-name">_unicode</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">_unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9107 <a name="L2920"></a><tt class="py-lineno">2920</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3111" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-3111', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-3112" class="py-name"><a title="lxml.etree.XSLT.tostring
9109 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3112', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt id="link-3113" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-3113', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-name">_unicode</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">_unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9110 <a name="L2921"></a><tt class="py-lineno">2921</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3114" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3114', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<b></b>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9111 <a name="L2922"></a><tt class="py-lineno">2922</tt> <tt class="py-line"> <tt id="link-3115" class="py-name"><a title="lxml.tests.common_imports.canonicalize" class="py-name" href="#" onclick="return doclink('link-3115', 'canonicalize', 'link-19');">canonicalize</a></tt><tt class="py-op">(</tt><tt id="link-3116" class="py-name"><a title="lxml.etree.XSLT.tostring
9113 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3116', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">,</tt> <tt id="link-3117" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-3117', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-name">_unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9114 <a name="L2923"></a><tt class="py-lineno">2923</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3118" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3118', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<c><d></d></c>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9115 <a name="L2924"></a><tt class="py-lineno">2924</tt> <tt class="py-line"> <tt id="link-3119" class="py-name"><a title="lxml.tests.common_imports.canonicalize" class="py-name" href="#" onclick="return doclink('link-3119', 'canonicalize', 'link-19');">canonicalize</a></tt><tt class="py-op">(</tt><tt id="link-3120" class="py-name"><a title="lxml.etree.XSLT.tostring
9117 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3120', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt id="link-3121" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-3121', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-name">_unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9118 </div><a name="L2925"></a><tt class="py-lineno">2925</tt> <tt class="py-line"> </tt>
9119 <a name="ETreeOnlyTestCase.test_tostring_unicode_none"></a><div id="ETreeOnlyTestCase.test_tostring_unicode_none-def"><a name="L2926"></a><tt class="py-lineno">2926</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_tostring_unicode_none-toggle" onclick="return toggle('ETreeOnlyTestCase.test_tostring_unicode_none');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_unicode_none">test_tostring_unicode_none</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9120 </div><div id="ETreeOnlyTestCase.test_tostring_unicode_none-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_tostring_unicode_none-expanded"><a name="L2927"></a><tt class="py-lineno">2927</tt> <tt class="py-line"> <tt id="link-3122" class="py-name"><a title="lxml.etree.XSLT.tostring
9122 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3122', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3123" class="py-name"><a title="lxml.etree
9123 lxml.sax.ElementTreeContentHandler.etree
9124 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9125 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9126 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3123', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3124" class="py-name"><a title="lxml.etree.XSLT.tostring
9128 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3124', 'tostring', 'link-597');">tostring</a></tt> </tt>
9129 <a name="L2928"></a><tt class="py-lineno">2928</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertRaises</tt><tt class="py-op">(</tt><tt class="py-name">TypeError</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3125" class="py-name"><a title="lxml.etree
9130 lxml.sax.ElementTreeContentHandler.etree
9131 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9132 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9133 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3125', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3126" class="py-name"><a title="lxml.etree.XSLT.tostring
9135 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3126', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">,</tt> </tt>
9136 <a name="L2929"></a><tt class="py-lineno">2929</tt> <tt class="py-line"> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt id="link-3127" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-3127', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-name">_unicode</tt><tt class="py-op">)</tt> </tt>
9137 </div><a name="L2930"></a><tt class="py-lineno">2930</tt> <tt class="py-line"> </tt>
9138 <a name="ETreeOnlyTestCase.test_tostring_unicode_element_tail"></a><div id="ETreeOnlyTestCase.test_tostring_unicode_element_tail-def"><a name="L2931"></a><tt class="py-lineno">2931</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_tostring_unicode_element_tail-toggle" onclick="return toggle('ETreeOnlyTestCase.test_tostring_unicode_element_tail');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_unicode_element_tail">test_tostring_unicode_element_tail</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9139 </div><div id="ETreeOnlyTestCase.test_tostring_unicode_element_tail-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_tostring_unicode_element_tail-expanded"><a name="L2932"></a><tt class="py-lineno">2932</tt> <tt class="py-line"> <tt id="link-3128" class="py-name"><a title="lxml.etree.XSLT.tostring
9141 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3128', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3129" class="py-name"><a title="lxml.etree
9142 lxml.sax.ElementTreeContentHandler.etree
9143 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9144 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9145 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3129', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3130" class="py-name"><a title="lxml.etree.XSLT.tostring
9147 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3130', 'tostring', 'link-597');">tostring</a></tt> </tt>
9148 <a name="L2933"></a><tt class="py-lineno">2933</tt> <tt class="py-line"> <tt id="link-3131" class="py-name"><a title="lxml.cssselect.Element
9151 lxml.objectify.Element
9152 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
9153 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3131', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3132" class="py-name"><a title="lxml.etree
9154 lxml.sax.ElementTreeContentHandler.etree
9155 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9156 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9157 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3132', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3133" class="py-name"><a title="lxml.cssselect.Element
9160 lxml.objectify.Element
9161 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
9162 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3133', 'Element', 'link-69');">Element</a></tt> </tt>
9163 <a name="L2934"></a><tt class="py-lineno">2934</tt> <tt class="py-line"> <tt id="link-3134" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3134', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3135" class="py-name"><a title="lxml.etree
9164 lxml.sax.ElementTreeContentHandler.etree
9165 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9166 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9167 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3135', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3136" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3136', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
9168 <a name="L2935"></a><tt class="py-lineno">2935</tt> <tt class="py-line"> </tt>
9169 <a name="L2936"></a><tt class="py-lineno">2936</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-3137" class="py-name"><a title="lxml.cssselect.Element
9172 lxml.objectify.Element
9173 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
9174 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3137', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
9175 <a name="L2937"></a><tt class="py-lineno">2937</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-3138" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3138', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
9176 <a name="L2938"></a><tt class="py-lineno">2938</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-3139" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3139', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
9177 <a name="L2939"></a><tt class="py-lineno">2939</tt> <tt class="py-line"> <tt class="py-name">d</tt> <tt class="py-op">=</tt> <tt id="link-3140" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3140', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">,</tt> <tt class="py-string">'d'</tt><tt class="py-op">)</tt> </tt>
9178 <a name="L2940"></a><tt class="py-lineno">2940</tt> <tt class="py-line"> <tt class="py-name">b</tt><tt class="py-op">.</tt><tt id="link-3141" class="py-name"><a title="lxml.etree._Element.tail
9179 lxml.etree._ReadOnlyProxy.tail
9180 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-3141', 'tail', 'link-850');">tail</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'Foo'</tt> </tt>
9181 <a name="L2941"></a><tt class="py-lineno">2941</tt> <tt class="py-line"> </tt>
9182 <a name="L2942"></a><tt class="py-lineno">2942</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3142" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-3142', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-3143" class="py-name"><a title="lxml.etree.XSLT.tostring
9184 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3143', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">,</tt> <tt id="link-3144" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-3144', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-name">_unicode</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">_unicode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9185 <a name="L2943"></a><tt class="py-lineno">2943</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3145" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-3145', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt id="link-3146" class="py-name"><a title="lxml.etree.XSLT.tostring
9187 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3146', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">,</tt> <tt id="link-3147" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-3147', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-name">_unicode</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'<b/>Foo'</tt> <tt class="py-keyword">or</tt> </tt>
9188 <a name="L2944"></a><tt class="py-lineno">2944</tt> <tt class="py-line"> <tt id="link-3148" class="py-name"><a title="lxml.etree.XSLT.tostring
9190 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3148', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">,</tt> <tt id="link-3149" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-3149', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-name">_unicode</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'<b />Foo'</tt><tt class="py-op">)</tt> </tt>
9191 </div><a name="L2945"></a><tt class="py-lineno">2945</tt> <tt class="py-line"> </tt>
9192 <a name="ETreeOnlyTestCase.test_tostring_unicode_pretty"></a><div id="ETreeOnlyTestCase.test_tostring_unicode_pretty-def"><a name="L2946"></a><tt class="py-lineno">2946</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase.test_tostring_unicode_pretty-toggle" onclick="return toggle('ETreeOnlyTestCase.test_tostring_unicode_pretty');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_unicode_pretty">test_tostring_unicode_pretty</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9193 </div><div id="ETreeOnlyTestCase.test_tostring_unicode_pretty-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase.test_tostring_unicode_pretty-expanded"><a name="L2947"></a><tt class="py-lineno">2947</tt> <tt class="py-line"> <tt id="link-3150" class="py-name"><a title="lxml.etree.XSLT.tostring
9195 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3150', 'tostring', 'link-597');">tostring</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3151" class="py-name"><a title="lxml.etree
9196 lxml.sax.ElementTreeContentHandler.etree
9197 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9198 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9199 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3151', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3152" class="py-name"><a title="lxml.etree.XSLT.tostring
9201 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3152', 'tostring', 'link-597');">tostring</a></tt> </tt>
9202 <a name="L2948"></a><tt class="py-lineno">2948</tt> <tt class="py-line"> <tt id="link-3153" class="py-name"><a title="lxml.cssselect.Element
9205 lxml.objectify.Element
9206 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
9207 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3153', 'Element', 'link-69');">Element</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3154" class="py-name"><a title="lxml.etree
9208 lxml.sax.ElementTreeContentHandler.etree
9209 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9210 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9211 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3154', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3155" class="py-name"><a title="lxml.cssselect.Element
9214 lxml.objectify.Element
9215 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
9216 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3155', 'Element', 'link-69');">Element</a></tt> </tt>
9217 <a name="L2949"></a><tt class="py-lineno">2949</tt> <tt class="py-line"> <tt id="link-3156" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3156', 'SubElement', 'link-112');">SubElement</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3157" class="py-name"><a title="lxml.etree
9218 lxml.sax.ElementTreeContentHandler.etree
9219 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9220 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9221 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3157', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3158" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3158', 'SubElement', 'link-112');">SubElement</a></tt> </tt>
9222 <a name="L2950"></a><tt class="py-lineno">2950</tt> <tt class="py-line"> </tt>
9223 <a name="L2951"></a><tt class="py-lineno">2951</tt> <tt class="py-line"> <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt id="link-3159" class="py-name"><a title="lxml.cssselect.Element
9226 lxml.objectify.Element
9227 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element
9228 xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-3159', 'Element', 'link-69');">Element</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">)</tt> </tt>
9229 <a name="L2952"></a><tt class="py-lineno">2952</tt> <tt class="py-line"> <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt id="link-3160" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3160', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
9230 <a name="L2953"></a><tt class="py-lineno">2953</tt> <tt class="py-line"> <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-3161" class="py-name"><a title="lxml.etree.SubElement" class="py-name" href="#" onclick="return doclink('link-3161', 'SubElement', 'link-112');">SubElement</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">)</tt> </tt>
9231 <a name="L2954"></a><tt class="py-lineno">2954</tt> <tt class="py-line"> </tt>
9232 <a name="L2955"></a><tt class="py-lineno">2955</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-3162" class="py-name"><a title="lxml.etree.XSLT.tostring
9234 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3162', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt id="link-3163" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-3163', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-name">_unicode</tt><tt class="py-op">)</tt> </tt>
9235 <a name="L2956"></a><tt class="py-lineno">2956</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt class="py-string">"<a><b/><c/></a>"</tt><tt class="py-op">)</tt> </tt>
9236 <a name="L2957"></a><tt class="py-lineno">2957</tt> <tt class="py-line"> </tt>
9237 <a name="L2958"></a><tt class="py-lineno">2958</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-3164" class="py-name"><a title="lxml.etree.XSLT.tostring
9239 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3164', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt id="link-3165" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-3165', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-name">_unicode</tt><tt class="py-op">,</tt> <tt class="py-name">pretty_print</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
9240 <a name="L2959"></a><tt class="py-lineno">2959</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt class="py-string">"<a><b/><c/></a>"</tt><tt class="py-op">)</tt> </tt>
9241 <a name="L2960"></a><tt class="py-lineno">2960</tt> <tt class="py-line"> </tt>
9242 <a name="L2961"></a><tt class="py-lineno">2961</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-3166" class="py-name"><a title="lxml.etree.XSLT.tostring
9244 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3166', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">,</tt> <tt id="link-3167" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-3167', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt class="py-name">_unicode</tt><tt class="py-op">,</tt> <tt class="py-name">pretty_print</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
9245 <a name="L2962"></a><tt class="py-lineno">2962</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt class="py-string">"<a>\n <b/>\n <c/>\n</a>\n"</tt><tt class="py-op">)</tt> </tt>
9246 </div><a name="L2963"></a><tt class="py-lineno">2963</tt> <tt class="py-line"> </tt>
9247 <a name="L2964"></a><tt class="py-lineno">2964</tt> <tt class="py-line"> <tt class="py-comment"># helper methods</tt> </tt>
9248 <a name="L2965"></a><tt class="py-lineno">2965</tt> <tt class="py-line"> </tt>
9249 <a name="ETreeOnlyTestCase._writeElement"></a><div id="ETreeOnlyTestCase._writeElement-def"><a name="L2966"></a><tt class="py-lineno">2966</tt> <a class="py-toggle" href="#" id="ETreeOnlyTestCase._writeElement-toggle" onclick="return toggle('ETreeOnlyTestCase._writeElement');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeOnlyTestCase-class.html#_writeElement">_writeElement</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">element</tt><tt class="py-op">,</tt> <tt class="py-param">encoding</tt><tt class="py-op">=</tt><tt class="py-string">'us-ascii'</tt><tt class="py-op">,</tt> <tt class="py-param">compression</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9250 </div><div id="ETreeOnlyTestCase._writeElement-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeOnlyTestCase._writeElement-expanded"><a name="L2967"></a><tt class="py-lineno">2967</tt> <tt class="py-line"> <tt class="py-docstring">"""Write out element for comparison.</tt> </tt>
9251 <a name="L2968"></a><tt class="py-lineno">2968</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
9252 <a name="L2969"></a><tt class="py-lineno">2969</tt> <tt class="py-line"> <tt id="link-3168" class="py-name"><a title="lxml.etree.ElementTree
9253 xml.etree.ElementTree
9254 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-3168', 'ElementTree', 'link-468');">ElementTree</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3169" class="py-name"><a title="lxml.etree
9255 lxml.sax.ElementTreeContentHandler.etree
9256 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9257 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9258 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3169', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3170" class="py-name"><a title="lxml.etree.ElementTree
9259 xml.etree.ElementTree
9260 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-3170', 'ElementTree', 'link-468');">ElementTree</a></tt> </tt>
9261 <a name="L2970"></a><tt class="py-lineno">2970</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9262 <a name="L2971"></a><tt class="py-lineno">2971</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-3171" class="py-name"><a title="lxml.etree.ElementTree
9263 xml.etree.ElementTree
9264 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-3171', 'ElementTree', 'link-468');">ElementTree</a></tt><tt class="py-op">(</tt><tt class="py-name">element</tt><tt class="py-op">=</tt><tt class="py-name">element</tt><tt class="py-op">)</tt> </tt>
9265 <a name="L2972"></a><tt class="py-lineno">2972</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3172" class="py-name" targets="Method lxml.etree._ElementTree.write()=lxml.etree._ElementTree-class.html#write"><a title="lxml.etree._ElementTree.write" class="py-name" href="#" onclick="return doclink('link-3172', 'write', 'link-3172');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt id="link-3173" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-3173', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">=</tt><tt id="link-3174" class="py-name"><a title="lxml.etree.DocInfo.encoding" class="py-name" href="#" onclick="return doclink('link-3174', 'encoding', 'link-890');">encoding</a></tt><tt class="py-op">,</tt> <tt class="py-name">compression</tt><tt class="py-op">=</tt><tt class="py-name">compression</tt><tt class="py-op">)</tt> </tt>
9266 <a name="L2973"></a><tt class="py-lineno">2973</tt> <tt class="py-line"> <tt id="link-3175" class="py-name"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-3175', 'data', 'link-971');">data</a></tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9267 <a name="L2974"></a><tt class="py-lineno">2974</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">compression</tt><tt class="py-op">:</tt> </tt>
9268 <a name="L2975"></a><tt class="py-lineno">2975</tt> <tt class="py-line"> <tt id="link-3176" class="py-name"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-3176', 'data', 'link-971');">data</a></tt> <tt class="py-op">=</tt> <tt class="py-name">zlib</tt><tt class="py-op">.</tt><tt class="py-name">decompress</tt><tt class="py-op">(</tt><tt id="link-3177" class="py-name"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-3177', 'data', 'link-971');">data</a></tt><tt class="py-op">)</tt> </tt>
9269 <a name="L2976"></a><tt class="py-lineno">2976</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt id="link-3178" class="py-name"><a title="lxml.tests.common_imports.canonicalize" class="py-name" href="#" onclick="return doclink('link-3178', 'canonicalize', 'link-19');">canonicalize</a></tt><tt class="py-op">(</tt><tt id="link-3179" class="py-name"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-3179', 'data', 'link-971');">data</a></tt><tt class="py-op">)</tt> </tt>
9270 </div></div><a name="L2977"></a><tt class="py-lineno">2977</tt> <tt class="py-line"> </tt>
9271 <a name="L2978"></a><tt class="py-lineno">2978</tt> <tt class="py-line"> </tt>
9272 <a name="XIncludeTestCase"></a><div id="XIncludeTestCase-def"><a name="L2979"></a><tt class="py-lineno">2979</tt> <a class="py-toggle" href="#" id="XIncludeTestCase-toggle" onclick="return toggle('XIncludeTestCase');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="lxml.tests.test_etree.XIncludeTestCase-class.html">XIncludeTestCase</a><tt class="py-op">(</tt><tt class="py-base-class">HelperTestCase</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9273 </div><div id="XIncludeTestCase-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="XIncludeTestCase-expanded"><a name="XIncludeTestCase.test_xinclude_text"></a><div id="XIncludeTestCase.test_xinclude_text-def"><a name="L2980"></a><tt class="py-lineno">2980</tt> <a class="py-toggle" href="#" id="XIncludeTestCase.test_xinclude_text-toggle" onclick="return toggle('XIncludeTestCase.test_xinclude_text');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.XIncludeTestCase-class.html#test_xinclude_text">test_xinclude_text</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9274 </div><div id="XIncludeTestCase.test_xinclude_text-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="XIncludeTestCase.test_xinclude_text-expanded"><a name="L2981"></a><tt class="py-lineno">2981</tt> <tt class="py-line"> <tt id="link-3180" class="py-name" targets="Variable lxml.etree._LogEntry.filename=lxml.etree._LogEntry-class.html#filename"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3180', 'filename', 'link-3180');">filename</a></tt> <tt class="py-op">=</tt> <tt id="link-3181" class="py-name"><a title="lxml.tests.common_imports.fileInTestDir" class="py-name" href="#" onclick="return doclink('link-3181', 'fileInTestDir', 'link-12');">fileInTestDir</a></tt><tt class="py-op">(</tt><tt class="py-string">'test_broken.xml'</tt><tt class="py-op">)</tt> </tt>
9275 <a name="L2982"></a><tt class="py-lineno">2982</tt> <tt class="py-line"> <tt id="link-3182" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-3182', 'root', 'link-220');">root</a></tt> <tt class="py-op">=</tt> <tt id="link-3183" class="py-name"><a title="lxml.etree
9276 lxml.sax.ElementTreeContentHandler.etree
9277 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9278 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9279 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3183', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3184" class="py-name"><a title="lxml.etree.XML
9281 lxml.tests.test_objectify.ObjectifyTestCase.XML
9282 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-3184', 'XML', 'link-217');">XML</a></tt><tt class="py-op">(</tt><tt id="link-3185" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3185', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'''\</tt> </tt>
9283 <a name="L2983"></a><tt class="py-lineno">2983</tt> <tt class="py-line"><tt class="py-string"> <doc xmlns:xi="http://www.w3.org/2001/XInclude"></tt> </tt>
9284 <a name="L2984"></a><tt class="py-lineno">2984</tt> <tt class="py-line"><tt class="py-string"> <xi:include href="%s" parse="text"/></tt> </tt>
9285 <a name="L2985"></a><tt class="py-lineno">2985</tt> <tt class="py-line"><tt class="py-string"> </doc></tt> </tt>
9286 <a name="L2986"></a><tt class="py-lineno">2986</tt> <tt class="py-line"><tt class="py-string"> '''</tt> <tt class="py-op">%</tt> <tt id="link-3186" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3186', 'filename', 'link-3180');">filename</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9287 <a name="L2987"></a><tt class="py-lineno">2987</tt> <tt class="py-line"> <tt class="py-name">old_text</tt> <tt class="py-op">=</tt> <tt id="link-3187" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-3187', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-3188" class="py-name"><a title="lxml.etree.QName.text
9288 lxml.etree._AppendOnlyElementProxy.text
9289 lxml.etree._Element.text
9290 lxml.etree._Entity.text
9291 lxml.etree._ModifyContentOnlyProxy.text
9292 lxml.etree._ReadOnlyEntityProxy.text
9293 lxml.etree._ReadOnlyProxy.text
9294 lxml.etree.__ContentOnlyElement.text
9295 lxml.objectify.ObjectifiedElement.text
9296 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-3188', 'text', 'link-194');">text</a></tt> </tt>
9297 <a name="L2988"></a><tt class="py-lineno">2988</tt> <tt class="py-line"> <tt class="py-name">content</tt> <tt class="py-op">=</tt> <tt id="link-3189" class="py-name"><a title="lxml.tests.common_imports.read_file" class="py-name" href="#" onclick="return doclink('link-3189', 'read_file', 'link-13');">read_file</a></tt><tt class="py-op">(</tt><tt id="link-3190" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3190', 'filename', 'link-3180');">filename</a></tt><tt class="py-op">)</tt> </tt>
9298 <a name="L2989"></a><tt class="py-lineno">2989</tt> <tt class="py-line"> <tt class="py-name">old_tail</tt> <tt class="py-op">=</tt> <tt id="link-3191" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-3191', 'root', 'link-220');">root</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-3192" class="py-name"><a title="lxml.etree._Element.tail
9299 lxml.etree._ReadOnlyProxy.tail
9300 xml.etree.ElementTree.Element.tail" class="py-name" href="#" onclick="return doclink('link-3192', 'tail', 'link-850');">tail</a></tt> </tt>
9301 <a name="L2990"></a><tt class="py-lineno">2990</tt> <tt class="py-line"> </tt>
9302 <a name="L2991"></a><tt class="py-lineno">2991</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3193" class="py-name" targets="Function lxml.ElementInclude.include()=lxml.ElementInclude-module.html#include,Package lxml.include=lxml.include-module.html,Method lxml.tests.test_etree.ETreeXIncludeTestCase.include()=lxml.tests.test_etree.ETreeXIncludeTestCase-class.html#include,Method lxml.tests.test_etree.ElementIncludeTestCase.include()=lxml.tests.test_etree.ElementIncludeTestCase-class.html#include"><a title="lxml.ElementInclude.include
9304 lxml.tests.test_etree.ETreeXIncludeTestCase.include
9305 lxml.tests.test_etree.ElementIncludeTestCase.include" class="py-name" href="#" onclick="return doclink('link-3193', 'include', 'link-3193');">include</a></tt><tt class="py-op">(</tt> <tt id="link-3194" class="py-name"><a title="lxml.etree
9306 lxml.sax.ElementTreeContentHandler.etree
9307 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9308 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9309 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3194', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3195" class="py-name"><a title="lxml.etree.ElementTree
9310 xml.etree.ElementTree
9311 xml.etree.ElementTree.ElementTree" class="py-name" href="#" onclick="return doclink('link-3195', 'ElementTree', 'link-468');">ElementTree</a></tt><tt class="py-op">(</tt><tt id="link-3196" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-3196', 'root', 'link-220');">root</a></tt><tt class="py-op">)</tt> <tt class="py-op">)</tt> </tt>
9312 <a name="L2992"></a><tt class="py-lineno">2992</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">old_text</tt> <tt class="py-op">+</tt> <tt class="py-name">content</tt> <tt class="py-op">+</tt> <tt class="py-name">old_tail</tt><tt class="py-op">,</tt> </tt>
9313 <a name="L2993"></a><tt class="py-lineno">2993</tt> <tt class="py-line"> <tt id="link-3197" class="py-name"><a title="lxml.etree.iterparse.root" class="py-name" href="#" onclick="return doclink('link-3197', 'root', 'link-220');">root</a></tt><tt class="py-op">.</tt><tt id="link-3198" class="py-name"><a title="lxml.etree.QName.text
9314 lxml.etree._AppendOnlyElementProxy.text
9315 lxml.etree._Element.text
9316 lxml.etree._Entity.text
9317 lxml.etree._ModifyContentOnlyProxy.text
9318 lxml.etree._ReadOnlyEntityProxy.text
9319 lxml.etree._ReadOnlyProxy.text
9320 lxml.etree.__ContentOnlyElement.text
9321 lxml.objectify.ObjectifiedElement.text
9322 xml.etree.ElementTree.Element.text" class="py-name" href="#" onclick="return doclink('link-3198', 'text', 'link-194');">text</a></tt><tt class="py-op">)</tt> </tt>
9323 </div><a name="L2994"></a><tt class="py-lineno">2994</tt> <tt class="py-line"> </tt>
9324 <a name="XIncludeTestCase.test_xinclude"></a><div id="XIncludeTestCase.test_xinclude-def"><a name="L2995"></a><tt class="py-lineno">2995</tt> <a class="py-toggle" href="#" id="XIncludeTestCase.test_xinclude-toggle" onclick="return toggle('XIncludeTestCase.test_xinclude');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.XIncludeTestCase-class.html#test_xinclude">test_xinclude</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9325 </div><div id="XIncludeTestCase.test_xinclude-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="XIncludeTestCase.test_xinclude-expanded"><a name="L2996"></a><tt class="py-lineno">2996</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-3199" class="py-name"><a title="lxml.etree
9326 lxml.sax.ElementTreeContentHandler.etree
9327 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9328 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9329 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3199', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3200" class="py-name"><a title="lxml.cssselect.parse
9330 lxml.etree._ElementTree.parse
9332 lxml.html.ElementSoup.parse
9333 lxml.html.html5parser.parse
9335 lxml.html.soupparser.parse
9336 lxml.objectify.parse
9337 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3200', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt id="link-3201" class="py-name"><a title="lxml.tests.common_imports.fileInTestDir" class="py-name" href="#" onclick="return doclink('link-3201', 'fileInTestDir', 'link-12');">fileInTestDir</a></tt><tt class="py-op">(</tt><tt class="py-string">'include/test_xinclude.xml'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9338 <a name="L2997"></a><tt class="py-lineno">2997</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertNotEquals</tt><tt class="py-op">(</tt> </tt>
9339 <a name="L2998"></a><tt class="py-lineno">2998</tt> <tt class="py-line"> <tt class="py-string">'a'</tt><tt class="py-op">,</tt> </tt>
9340 <a name="L2999"></a><tt class="py-lineno">2999</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3202" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-3202', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-3203" class="py-name"><a title="lxml.etree._Comment.tag
9341 lxml.etree._Element.tag
9342 lxml.etree._Entity.tag
9343 lxml.etree._ProcessingInstruction.tag
9344 lxml.etree._ReadOnlyProxy.tag
9345 lxml.tests.test_xpathevaluator.tag
9346 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-3203', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
9347 <a name="L3000"></a><tt class="py-lineno">3000</tt> <tt class="py-line"> <tt class="py-comment"># process xincludes</tt> </tt>
9348 <a name="L3001"></a><tt class="py-lineno">3001</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3204" class="py-name"><a title="lxml.ElementInclude.include
9350 lxml.tests.test_etree.ETreeXIncludeTestCase.include
9351 lxml.tests.test_etree.ElementIncludeTestCase.include" class="py-name" href="#" onclick="return doclink('link-3204', 'include', 'link-3193');">include</a></tt><tt class="py-op">(</tt> <tt class="py-name">tree</tt> <tt class="py-op">)</tt> </tt>
9352 <a name="L3002"></a><tt class="py-lineno">3002</tt> <tt class="py-line"> <tt class="py-comment"># check whether we find it replaced with included data</tt> </tt>
9353 <a name="L3003"></a><tt class="py-lineno">3003</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
9354 <a name="L3004"></a><tt class="py-lineno">3004</tt> <tt class="py-line"> <tt class="py-string">'a'</tt><tt class="py-op">,</tt> </tt>
9355 <a name="L3005"></a><tt class="py-lineno">3005</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3205" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-3205', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-3206" class="py-name"><a title="lxml.etree._Comment.tag
9356 lxml.etree._Element.tag
9357 lxml.etree._Entity.tag
9358 lxml.etree._ProcessingInstruction.tag
9359 lxml.etree._ReadOnlyProxy.tag
9360 lxml.tests.test_xpathevaluator.tag
9361 xml.etree.ElementTree.Element.tag" class="py-name" href="#" onclick="return doclink('link-3206', 'tag', 'link-73');">tag</a></tt><tt class="py-op">)</tt> </tt>
9362 </div><a name="L3006"></a><tt class="py-lineno">3006</tt> <tt class="py-line"> </tt>
9363 <a name="XIncludeTestCase.test_xinclude_resolver"></a><div id="XIncludeTestCase.test_xinclude_resolver-def"><a name="L3007"></a><tt class="py-lineno">3007</tt> <a class="py-toggle" href="#" id="XIncludeTestCase.test_xinclude_resolver-toggle" onclick="return toggle('XIncludeTestCase.test_xinclude_resolver');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.XIncludeTestCase-class.html#test_xinclude_resolver">test_xinclude_resolver</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9364 </div><div id="XIncludeTestCase.test_xinclude_resolver-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="XIncludeTestCase.test_xinclude_resolver-expanded"><a name="L3008"></a><tt class="py-lineno">3008</tt> <tt class="py-line"> <tt class="py-keyword">class</tt> <tt class="py-def-name">res</tt><tt class="py-op">(</tt><tt class="py-base-class">etree</tt><tt class="py-op">.</tt><tt class="py-base-class">Resolver</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9365 <a name="L3009"></a><tt class="py-lineno">3009</tt> <tt class="py-line"> <tt class="py-name">include_text</tt> <tt class="py-op">=</tt> <tt id="link-3207" class="py-name"><a title="lxml.tests.common_imports.read_file" class="py-name" href="#" onclick="return doclink('link-3207', 'read_file', 'link-13');">read_file</a></tt><tt class="py-op">(</tt><tt id="link-3208" class="py-name"><a title="lxml.tests.common_imports.fileInTestDir" class="py-name" href="#" onclick="return doclink('link-3208', 'fileInTestDir', 'link-12');">fileInTestDir</a></tt><tt class="py-op">(</tt><tt class="py-string">'test.xml'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9366 <a name="L3010"></a><tt class="py-lineno">3010</tt> <tt class="py-line"> <tt class="py-name">called</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
9367 <a name="L3011"></a><tt class="py-lineno">3011</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">resolve</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">url</tt><tt class="py-op">,</tt> <tt class="py-param">id</tt><tt class="py-op">,</tt> <tt class="py-param">context</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9368 <a name="L3012"></a><tt class="py-lineno">3012</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">url</tt><tt class="py-op">.</tt><tt class="py-name">endswith</tt><tt class="py-op">(</tt><tt class="py-string">".dtd"</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9369 <a name="L3013"></a><tt class="py-lineno">3013</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">called</tt><tt class="py-op">[</tt><tt class="py-string">"dtd"</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
9370 <a name="L3014"></a><tt class="py-lineno">3014</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3209" class="py-name"><a title="lxml.etree.Resolver.resolve_filename" class="py-name" href="#" onclick="return doclink('link-3209', 'resolve_filename', 'link-1235');">resolve_filename</a></tt><tt class="py-op">(</tt> </tt>
9371 <a name="L3015"></a><tt class="py-lineno">3015</tt> <tt class="py-line"> <tt id="link-3210" class="py-name"><a title="lxml.tests.common_imports.fileInTestDir" class="py-name" href="#" onclick="return doclink('link-3210', 'fileInTestDir', 'link-12');">fileInTestDir</a></tt><tt class="py-op">(</tt><tt class="py-string">'test.dtd'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">context</tt><tt class="py-op">)</tt> </tt>
9372 <a name="L3016"></a><tt class="py-lineno">3016</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">url</tt><tt class="py-op">.</tt><tt class="py-name">endswith</tt><tt class="py-op">(</tt><tt class="py-string">"test_xinclude.xml"</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9373 <a name="L3017"></a><tt class="py-lineno">3017</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">called</tt><tt class="py-op">[</tt><tt class="py-string">"input"</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
9374 <a name="L3018"></a><tt class="py-lineno">3018</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> <tt class="py-comment"># delegate to default resolver</tt> </tt>
9375 <a name="L3019"></a><tt class="py-lineno">3019</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
9376 <a name="L3020"></a><tt class="py-lineno">3020</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">called</tt><tt class="py-op">[</tt><tt class="py-string">"include"</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
9377 <a name="L3021"></a><tt class="py-lineno">3021</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3211" class="py-name"><a title="lxml.etree.Resolver.resolve_string" class="py-name" href="#" onclick="return doclink('link-3211', 'resolve_string', 'link-1171');">resolve_string</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">include_text</tt><tt class="py-op">,</tt> <tt class="py-name">context</tt><tt class="py-op">)</tt> </tt>
9378 </div></div><a name="L3022"></a><tt class="py-lineno">3022</tt> <tt class="py-line"> </tt>
9379 <a name="L3023"></a><tt class="py-lineno">3023</tt> <tt class="py-line"> <tt class="py-name">res_instance</tt> <tt class="py-op">=</tt> <tt class="py-name">res</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9380 <a name="L3024"></a><tt class="py-lineno">3024</tt> <tt class="py-line"> <tt id="link-3212" class="py-name"><a title="lxml.etree._ElementTree.parser
9381 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-3212', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt id="link-3213" class="py-name"><a title="lxml.etree
9382 lxml.sax.ElementTreeContentHandler.etree
9383 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9384 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9385 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3213', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3214" class="py-name"><a title="lxml.etree.XMLParser
9386 xml.etree.ElementTree.XMLParser" class="py-name" href="#" onclick="return doclink('link-3214', 'XMLParser', 'link-743');">XMLParser</a></tt><tt class="py-op">(</tt><tt class="py-name">load_dtd</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
9387 <a name="L3025"></a><tt class="py-lineno">3025</tt> <tt class="py-line"> <tt id="link-3215" class="py-name"><a title="lxml.etree._ElementTree.parser
9388 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-3215', 'parser', 'link-748');">parser</a></tt><tt class="py-op">.</tt><tt id="link-3216" class="py-name"><a title="lxml.etree._BaseParser.resolvers" class="py-name" href="#" onclick="return doclink('link-3216', 'resolvers', 'link-1174');">resolvers</a></tt><tt class="py-op">.</tt><tt id="link-3217" class="py-name"><a title="lxml.etree._ResolverRegistry.add
9389 lxml.html.CheckboxValues.add
9390 lxml.html.MultipleSelectOptions.add" class="py-name" href="#" onclick="return doclink('link-3217', 'add', 'link-1175');">add</a></tt><tt class="py-op">(</tt><tt class="py-name">res_instance</tt><tt class="py-op">)</tt> </tt>
9391 <a name="L3026"></a><tt class="py-lineno">3026</tt> <tt class="py-line"> </tt>
9392 <a name="L3027"></a><tt class="py-lineno">3027</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt id="link-3218" class="py-name"><a title="lxml.etree
9393 lxml.sax.ElementTreeContentHandler.etree
9394 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9395 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9396 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3218', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3219" class="py-name"><a title="lxml.cssselect.parse
9397 lxml.etree._ElementTree.parse
9399 lxml.html.ElementSoup.parse
9400 lxml.html.html5parser.parse
9402 lxml.html.soupparser.parse
9403 lxml.objectify.parse
9404 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3219', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt id="link-3220" class="py-name"><a title="lxml.tests.common_imports.fileInTestDir" class="py-name" href="#" onclick="return doclink('link-3220', 'fileInTestDir', 'link-12');">fileInTestDir</a></tt><tt class="py-op">(</tt><tt class="py-string">'include/test_xinclude.xml'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9405 <a name="L3028"></a><tt class="py-lineno">3028</tt> <tt class="py-line"> <tt id="link-3221" class="py-name"><a title="lxml.etree._ElementTree.parser
9406 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-3221', 'parser', 'link-748');">parser</a></tt> <tt class="py-op">=</tt> <tt id="link-3222" class="py-name"><a title="lxml.etree._ElementTree.parser
9407 lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser" class="py-name" href="#" onclick="return doclink('link-3222', 'parser', 'link-748');">parser</a></tt><tt class="py-op">)</tt> </tt>
9408 <a name="L3029"></a><tt class="py-lineno">3029</tt> <tt class="py-line"> </tt>
9409 <a name="L3030"></a><tt class="py-lineno">3030</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3223" class="py-name"><a title="lxml.ElementInclude.include
9411 lxml.tests.test_etree.ETreeXIncludeTestCase.include
9412 lxml.tests.test_etree.ElementIncludeTestCase.include" class="py-name" href="#" onclick="return doclink('link-3223', 'include', 'link-3193');">include</a></tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">)</tt> </tt>
9413 <a name="L3031"></a><tt class="py-lineno">3031</tt> <tt class="py-line"> </tt>
9414 <a name="L3032"></a><tt class="py-lineno">3032</tt> <tt class="py-line"> <tt class="py-name">called</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">res_instance</tt><tt class="py-op">.</tt><tt class="py-name">called</tt><tt class="py-op">.</tt><tt id="link-3224" class="py-name"><a title="lxml.etree._Attrib.items
9415 lxml.etree._Element.items
9416 lxml.etree._IDDict.items
9417 lxml.etree._NamespaceRegistry.items
9418 lxml.etree._ReadOnlyElementProxy.items
9419 lxml.etree.__ContentOnlyElement.items" class="py-name" href="#" onclick="return doclink('link-3224', 'items', 'link-2088');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9420 <a name="L3033"></a><tt class="py-lineno">3033</tt> <tt class="py-line"> <tt class="py-name">called</tt><tt class="py-op">.</tt><tt class="py-name">sort</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9421 <a name="L3034"></a><tt class="py-lineno">3034</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt> </tt>
9422 <a name="L3035"></a><tt class="py-lineno">3035</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt class="py-string">"dtd"</tt><tt class="py-op">,</tt> <tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-string">"include"</tt><tt class="py-op">,</tt> <tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-string">"input"</tt><tt class="py-op">,</tt> <tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
9423 <a name="L3036"></a><tt class="py-lineno">3036</tt> <tt class="py-line"> <tt class="py-name">called</tt><tt class="py-op">)</tt> </tt>
9424 </div></div><a name="L3037"></a><tt class="py-lineno">3037</tt> <tt class="py-line"> </tt>
9425 <a name="ETreeXIncludeTestCase"></a><div id="ETreeXIncludeTestCase-def"><a name="L3038"></a><tt class="py-lineno">3038</tt> <a class="py-toggle" href="#" id="ETreeXIncludeTestCase-toggle" onclick="return toggle('ETreeXIncludeTestCase');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeXIncludeTestCase-class.html">ETreeXIncludeTestCase</a><tt class="py-op">(</tt><tt class="py-base-class">XIncludeTestCase</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9426 </div><div id="ETreeXIncludeTestCase-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="ETreeXIncludeTestCase-expanded"><a name="ETreeXIncludeTestCase.include"></a><div id="ETreeXIncludeTestCase.include-def"><a name="L3039"></a><tt class="py-lineno">3039</tt> <a class="py-toggle" href="#" id="ETreeXIncludeTestCase.include-toggle" onclick="return toggle('ETreeXIncludeTestCase.include');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeXIncludeTestCase-class.html#include">include</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tree</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9427 </div><div id="ETreeXIncludeTestCase.include-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeXIncludeTestCase.include-expanded"><a name="L3040"></a><tt class="py-lineno">3040</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3225" class="py-name" targets="Method lxml.etree._ElementTree.xinclude()=lxml.etree._ElementTree-class.html#xinclude"><a title="lxml.etree._ElementTree.xinclude" class="py-name" href="#" onclick="return doclink('link-3225', 'xinclude', 'link-3225');">xinclude</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9428 </div></div><a name="L3041"></a><tt class="py-lineno">3041</tt> <tt class="py-line"> </tt>
9429 <a name="L3042"></a><tt class="py-lineno">3042</tt> <tt class="py-line"> </tt>
9430 <a name="ElementIncludeTestCase"></a><div id="ElementIncludeTestCase-def"><a name="L3043"></a><tt class="py-lineno">3043</tt> <a class="py-toggle" href="#" id="ElementIncludeTestCase-toggle" onclick="return toggle('ElementIncludeTestCase');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="lxml.tests.test_etree.ElementIncludeTestCase-class.html">ElementIncludeTestCase</a><tt class="py-op">(</tt><tt class="py-base-class">XIncludeTestCase</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9431 </div><div id="ElementIncludeTestCase-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="ElementIncludeTestCase-expanded"><a name="L3044"></a><tt class="py-lineno">3044</tt> <tt class="py-line"> <tt class="py-keyword">from</tt> <tt id="link-3226" class="py-name" targets="Package lxml=lxml-module.html"><a title="lxml" class="py-name" href="#" onclick="return doclink('link-3226', 'lxml', 'link-3226');">lxml</a></tt> <tt class="py-keyword">import</tt> <tt id="link-3227" class="py-name" targets="Module lxml.ElementInclude=lxml.ElementInclude-module.html"><a title="lxml.ElementInclude" class="py-name" href="#" onclick="return doclink('link-3227', 'ElementInclude', 'link-3227');">ElementInclude</a></tt> </tt>
9432 <a name="ElementIncludeTestCase.include"></a><div id="ElementIncludeTestCase.include-def"><a name="L3045"></a><tt class="py-lineno">3045</tt> <a class="py-toggle" href="#" id="ElementIncludeTestCase.include-toggle" onclick="return toggle('ElementIncludeTestCase.include');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ElementIncludeTestCase-class.html#include">include</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tree</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9433 </div><div id="ElementIncludeTestCase.include-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ElementIncludeTestCase.include-expanded"><a name="L3046"></a><tt class="py-lineno">3046</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3228" class="py-name"><a title="lxml.ElementInclude" class="py-name" href="#" onclick="return doclink('link-3228', 'ElementInclude', 'link-3227');">ElementInclude</a></tt><tt class="py-op">.</tt><tt id="link-3229" class="py-name"><a title="lxml.ElementInclude.include
9435 lxml.tests.test_etree.ETreeXIncludeTestCase.include
9436 lxml.tests.test_etree.ElementIncludeTestCase.include" class="py-name" href="#" onclick="return doclink('link-3229', 'include', 'link-3193');">include</a></tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3230" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-3230', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9437 </div></div><a name="L3047"></a><tt class="py-lineno">3047</tt> <tt class="py-line"> </tt>
9438 <a name="L3048"></a><tt class="py-lineno">3048</tt> <tt class="py-line"> </tt>
9439 <a name="ETreeC14NTestCase"></a><div id="ETreeC14NTestCase-def"><a name="L3049"></a><tt class="py-lineno">3049</tt> <a class="py-toggle" href="#" id="ETreeC14NTestCase-toggle" onclick="return toggle('ETreeC14NTestCase');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeC14NTestCase-class.html">ETreeC14NTestCase</a><tt class="py-op">(</tt><tt class="py-base-class">HelperTestCase</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9440 </div><div id="ETreeC14NTestCase-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="ETreeC14NTestCase-expanded"><a name="ETreeC14NTestCase.test_c14n"></a><div id="ETreeC14NTestCase.test_c14n-def"><a name="L3050"></a><tt class="py-lineno">3050</tt> <a class="py-toggle" href="#" id="ETreeC14NTestCase.test_c14n-toggle" onclick="return toggle('ETreeC14NTestCase.test_c14n');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeC14NTestCase-class.html#test_c14n">test_c14n</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9441 </div><div id="ETreeC14NTestCase.test_c14n-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeC14NTestCase.test_c14n-expanded"><a name="L3051"></a><tt class="py-lineno">3051</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3231" class="py-name"><a title="lxml.cssselect.parse
9442 lxml.etree._ElementTree.parse
9444 lxml.html.ElementSoup.parse
9445 lxml.html.html5parser.parse
9447 lxml.html.soupparser.parse
9448 lxml.objectify.parse
9449 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3231', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt id="link-3232" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3232', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b/></a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9450 <a name="L3052"></a><tt class="py-lineno">3052</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9451 <a name="L3053"></a><tt class="py-lineno">3053</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3233" class="py-name" targets="Method lxml.etree._ElementTree.write_c14n()=lxml.etree._ElementTree-class.html#write_c14n"><a title="lxml.etree._ElementTree.write_c14n" class="py-name" href="#" onclick="return doclink('link-3233', 'write_c14n', 'link-3233');">write_c14n</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
9452 <a name="L3054"></a><tt class="py-lineno">3054</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9453 <a name="L3055"></a><tt class="py-lineno">3055</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3234" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3234', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b></b></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9454 <a name="L3056"></a><tt class="py-lineno">3056</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9455 </div><a name="L3057"></a><tt class="py-lineno">3057</tt> <tt class="py-line"> </tt>
9456 <a name="ETreeC14NTestCase.test_c14n_gzip"></a><div id="ETreeC14NTestCase.test_c14n_gzip-def"><a name="L3058"></a><tt class="py-lineno">3058</tt> <a class="py-toggle" href="#" id="ETreeC14NTestCase.test_c14n_gzip-toggle" onclick="return toggle('ETreeC14NTestCase.test_c14n_gzip');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeC14NTestCase-class.html#test_c14n_gzip">test_c14n_gzip</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9457 </div><div id="ETreeC14NTestCase.test_c14n_gzip-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeC14NTestCase.test_c14n_gzip-expanded"><a name="L3059"></a><tt class="py-lineno">3059</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3235" class="py-name"><a title="lxml.cssselect.parse
9458 lxml.etree._ElementTree.parse
9460 lxml.html.ElementSoup.parse
9461 lxml.html.html5parser.parse
9463 lxml.html.soupparser.parse
9464 lxml.objectify.parse
9465 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3235', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt id="link-3236" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3236', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a>'</tt><tt class="py-op">+</tt><tt class="py-string">'<b/>'</tt><tt class="py-op">*</tt><tt class="py-number">200</tt><tt class="py-op">+</tt><tt class="py-string">'</a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9466 <a name="L3060"></a><tt class="py-lineno">3060</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9467 <a name="L3061"></a><tt class="py-lineno">3061</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3237" class="py-name"><a title="lxml.etree._ElementTree.write_c14n" class="py-name" href="#" onclick="return doclink('link-3237', 'write_c14n', 'link-3233');">write_c14n</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">compression</tt><tt class="py-op">=</tt><tt class="py-number">9</tt><tt class="py-op">)</tt> </tt>
9468 <a name="L3062"></a><tt class="py-lineno">3062</tt> <tt class="py-line"> <tt class="py-name">gzfile</tt> <tt class="py-op">=</tt> <tt class="py-name">gzip</tt><tt class="py-op">.</tt><tt class="py-name">GzipFile</tt><tt class="py-op">(</tt><tt class="py-name">fileobj</tt><tt class="py-op">=</tt><tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9469 <a name="L3063"></a><tt class="py-lineno">3063</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
9470 <a name="L3064"></a><tt class="py-lineno">3064</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-name">gzfile</tt><tt class="py-op">.</tt><tt id="link-3238" class="py-name" targets="Method lxml.tests.common_imports.LargeFileLike.read()=lxml.tests.common_imports.LargeFileLike-class.html#read,Method lxml.tests.common_imports.SillyFileLike.read()=lxml.tests.common_imports.SillyFileLike-class.html#read"><a title="lxml.tests.common_imports.LargeFileLike.read
9471 lxml.tests.common_imports.SillyFileLike.read" class="py-name" href="#" onclick="return doclink('link-3238', 'read', 'link-3238');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9472 <a name="L3065"></a><tt class="py-lineno">3065</tt> <tt class="py-line"> <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
9473 <a name="L3066"></a><tt class="py-lineno">3066</tt> <tt class="py-line"> <tt class="py-name">gzfile</tt><tt class="py-op">.</tt><tt id="link-3239" class="py-name"><a title="lxml.etree.TreeBuilder.close
9474 lxml.etree._FeedParser.close" class="py-name" href="#" onclick="return doclink('link-3239', 'close', 'link-937');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9475 <a name="L3067"></a><tt class="py-lineno">3067</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3240" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3240', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a>'</tt><tt class="py-op">+</tt><tt class="py-string">'<b></b>'</tt><tt class="py-op">*</tt><tt class="py-number">200</tt><tt class="py-op">+</tt><tt class="py-string">'</a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9476 <a name="L3068"></a><tt class="py-lineno">3068</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9477 </div><a name="L3069"></a><tt class="py-lineno">3069</tt> <tt class="py-line"> </tt>
9478 <a name="ETreeC14NTestCase.test_c14n_file"></a><div id="ETreeC14NTestCase.test_c14n_file-def"><a name="L3070"></a><tt class="py-lineno">3070</tt> <a class="py-toggle" href="#" id="ETreeC14NTestCase.test_c14n_file-toggle" onclick="return toggle('ETreeC14NTestCase.test_c14n_file');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeC14NTestCase-class.html#test_c14n_file">test_c14n_file</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9479 </div><div id="ETreeC14NTestCase.test_c14n_file-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeC14NTestCase.test_c14n_file-expanded"><a name="L3071"></a><tt class="py-lineno">3071</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3241" class="py-name"><a title="lxml.cssselect.parse
9480 lxml.etree._ElementTree.parse
9482 lxml.html.ElementSoup.parse
9483 lxml.html.html5parser.parse
9485 lxml.html.soupparser.parse
9486 lxml.objectify.parse
9487 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3241', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt id="link-3242" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3242', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b/></a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9488 <a name="L3072"></a><tt class="py-lineno">3072</tt> <tt class="py-line"> <tt id="link-3243" class="py-name" targets="Method lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker.handle()=lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker-class.html#handle,Method lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker.handle()=lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker-class.html#handle,Method lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker.handle()=lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker-class.html#handle,Method lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker.handle()=lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker-class.html#handle,Method lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker.handle()=lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker-class.html#handle"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker.handle
9489 lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker.handle
9490 lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker.handle
9491 lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker.handle
9492 lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker.handle" class="py-name" href="#" onclick="return doclink('link-3243', 'handle', 'link-3243');">handle</a></tt><tt class="py-op">,</tt> <tt id="link-3244" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3244', 'filename', 'link-3180');">filename</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tempfile</tt><tt class="py-op">.</tt><tt class="py-name">mkstemp</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9493 <a name="L3073"></a><tt class="py-lineno">3073</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
9494 <a name="L3074"></a><tt class="py-lineno">3074</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3245" class="py-name"><a title="lxml.etree._ElementTree.write_c14n" class="py-name" href="#" onclick="return doclink('link-3245', 'write_c14n', 'link-3233');">write_c14n</a></tt><tt class="py-op">(</tt><tt id="link-3246" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3246', 'filename', 'link-3180');">filename</a></tt><tt class="py-op">)</tt> </tt>
9495 <a name="L3075"></a><tt class="py-lineno">3075</tt> <tt class="py-line"> <tt id="link-3247" class="py-name"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-3247', 'data', 'link-971');">data</a></tt> <tt class="py-op">=</tt> <tt id="link-3248" class="py-name"><a title="lxml.tests.common_imports.read_file" class="py-name" href="#" onclick="return doclink('link-3248', 'read_file', 'link-13');">read_file</a></tt><tt class="py-op">(</tt><tt id="link-3249" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3249', 'filename', 'link-3180');">filename</a></tt><tt class="py-op">,</tt> <tt class="py-string">'rb'</tt><tt class="py-op">)</tt> </tt>
9496 <a name="L3076"></a><tt class="py-lineno">3076</tt> <tt class="py-line"> <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
9497 <a name="L3077"></a><tt class="py-lineno">3077</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-3250" class="py-name"><a title="lxml.etree.TreeBuilder.close
9498 lxml.etree._FeedParser.close" class="py-name" href="#" onclick="return doclink('link-3250', 'close', 'link-937');">close</a></tt><tt class="py-op">(</tt><tt id="link-3251" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker.handle
9499 lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker.handle
9500 lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker.handle
9501 lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker.handle
9502 lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker.handle" class="py-name" href="#" onclick="return doclink('link-3251', 'handle', 'link-3243');">handle</a></tt><tt class="py-op">)</tt> </tt>
9503 <a name="L3078"></a><tt class="py-lineno">3078</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-3252" class="py-name"><a title="lxml.etree._Element.remove
9504 lxml.etree._ResolverRegistry.remove
9505 lxml.html.CheckboxValues.remove
9506 lxml.html.MultipleSelectOptions.remove" class="py-name" href="#" onclick="return doclink('link-3252', 'remove', 'link-607');">remove</a></tt><tt class="py-op">(</tt><tt id="link-3253" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3253', 'filename', 'link-3180');">filename</a></tt><tt class="py-op">)</tt> </tt>
9507 <a name="L3079"></a><tt class="py-lineno">3079</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3254" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3254', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b></b></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9508 <a name="L3080"></a><tt class="py-lineno">3080</tt> <tt class="py-line"> <tt id="link-3255" class="py-name"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-3255', 'data', 'link-971');">data</a></tt><tt class="py-op">)</tt> </tt>
9509 </div><a name="L3081"></a><tt class="py-lineno">3081</tt> <tt class="py-line"> </tt>
9510 <a name="ETreeC14NTestCase.test_c14n_file_gzip"></a><div id="ETreeC14NTestCase.test_c14n_file_gzip-def"><a name="L3082"></a><tt class="py-lineno">3082</tt> <a class="py-toggle" href="#" id="ETreeC14NTestCase.test_c14n_file_gzip-toggle" onclick="return toggle('ETreeC14NTestCase.test_c14n_file_gzip');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeC14NTestCase-class.html#test_c14n_file_gzip">test_c14n_file_gzip</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9511 </div><div id="ETreeC14NTestCase.test_c14n_file_gzip-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeC14NTestCase.test_c14n_file_gzip-expanded"><a name="L3083"></a><tt class="py-lineno">3083</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3256" class="py-name"><a title="lxml.cssselect.parse
9512 lxml.etree._ElementTree.parse
9514 lxml.html.ElementSoup.parse
9515 lxml.html.html5parser.parse
9517 lxml.html.soupparser.parse
9518 lxml.objectify.parse
9519 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3256', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt id="link-3257" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3257', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a>'</tt><tt class="py-op">+</tt><tt class="py-string">'<b/>'</tt><tt class="py-op">*</tt><tt class="py-number">200</tt><tt class="py-op">+</tt><tt class="py-string">'</a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9520 <a name="L3084"></a><tt class="py-lineno">3084</tt> <tt class="py-line"> <tt id="link-3258" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker.handle
9521 lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker.handle
9522 lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker.handle
9523 lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker.handle
9524 lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker.handle" class="py-name" href="#" onclick="return doclink('link-3258', 'handle', 'link-3243');">handle</a></tt><tt class="py-op">,</tt> <tt id="link-3259" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3259', 'filename', 'link-3180');">filename</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tempfile</tt><tt class="py-op">.</tt><tt class="py-name">mkstemp</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9525 <a name="L3085"></a><tt class="py-lineno">3085</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
9526 <a name="L3086"></a><tt class="py-lineno">3086</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3260" class="py-name"><a title="lxml.etree._ElementTree.write_c14n" class="py-name" href="#" onclick="return doclink('link-3260', 'write_c14n', 'link-3233');">write_c14n</a></tt><tt class="py-op">(</tt><tt id="link-3261" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3261', 'filename', 'link-3180');">filename</a></tt><tt class="py-op">,</tt> <tt class="py-name">compression</tt><tt class="py-op">=</tt><tt class="py-number">9</tt><tt class="py-op">)</tt> </tt>
9527 <a name="L3087"></a><tt class="py-lineno">3087</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">gzip</tt><tt class="py-op">.</tt><tt class="py-name">open</tt><tt class="py-op">(</tt><tt id="link-3262" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3262', 'filename', 'link-3180');">filename</a></tt><tt class="py-op">,</tt> <tt class="py-string">'rb'</tt><tt class="py-op">)</tt> </tt>
9528 <a name="L3088"></a><tt class="py-lineno">3088</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
9529 <a name="L3089"></a><tt class="py-lineno">3089</tt> <tt class="py-line"> <tt id="link-3263" class="py-name"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-3263', 'data', 'link-971');">data</a></tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt id="link-3264" class="py-name"><a title="lxml.tests.common_imports.LargeFileLike.read
9530 lxml.tests.common_imports.SillyFileLike.read" class="py-name" href="#" onclick="return doclink('link-3264', 'read', 'link-3238');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9531 <a name="L3090"></a><tt class="py-lineno">3090</tt> <tt class="py-line"> <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
9532 <a name="L3091"></a><tt class="py-lineno">3091</tt> <tt class="py-line"> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt id="link-3265" class="py-name"><a title="lxml.etree.TreeBuilder.close
9533 lxml.etree._FeedParser.close" class="py-name" href="#" onclick="return doclink('link-3265', 'close', 'link-937');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9534 <a name="L3092"></a><tt class="py-lineno">3092</tt> <tt class="py-line"> <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
9535 <a name="L3093"></a><tt class="py-lineno">3093</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-3266" class="py-name"><a title="lxml.etree.TreeBuilder.close
9536 lxml.etree._FeedParser.close" class="py-name" href="#" onclick="return doclink('link-3266', 'close', 'link-937');">close</a></tt><tt class="py-op">(</tt><tt id="link-3267" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker.handle
9537 lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker.handle
9538 lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker.handle
9539 lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker.handle
9540 lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker.handle" class="py-name" href="#" onclick="return doclink('link-3267', 'handle', 'link-3243');">handle</a></tt><tt class="py-op">)</tt> </tt>
9541 <a name="L3094"></a><tt class="py-lineno">3094</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-3268" class="py-name"><a title="lxml.etree._Element.remove
9542 lxml.etree._ResolverRegistry.remove
9543 lxml.html.CheckboxValues.remove
9544 lxml.html.MultipleSelectOptions.remove" class="py-name" href="#" onclick="return doclink('link-3268', 'remove', 'link-607');">remove</a></tt><tt class="py-op">(</tt><tt id="link-3269" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3269', 'filename', 'link-3180');">filename</a></tt><tt class="py-op">)</tt> </tt>
9545 <a name="L3095"></a><tt class="py-lineno">3095</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3270" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3270', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a>'</tt><tt class="py-op">+</tt><tt class="py-string">'<b></b>'</tt><tt class="py-op">*</tt><tt class="py-number">200</tt><tt class="py-op">+</tt><tt class="py-string">'</a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9546 <a name="L3096"></a><tt class="py-lineno">3096</tt> <tt class="py-line"> <tt id="link-3271" class="py-name"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-3271', 'data', 'link-971');">data</a></tt><tt class="py-op">)</tt> </tt>
9547 </div><a name="L3097"></a><tt class="py-lineno">3097</tt> <tt class="py-line"> </tt>
9548 <a name="ETreeC14NTestCase.test_c14n_with_comments"></a><div id="ETreeC14NTestCase.test_c14n_with_comments-def"><a name="L3098"></a><tt class="py-lineno">3098</tt> <a class="py-toggle" href="#" id="ETreeC14NTestCase.test_c14n_with_comments-toggle" onclick="return toggle('ETreeC14NTestCase.test_c14n_with_comments');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeC14NTestCase-class.html#test_c14n_with_comments">test_c14n_with_comments</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9549 </div><div id="ETreeC14NTestCase.test_c14n_with_comments-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeC14NTestCase.test_c14n_with_comments-expanded"><a name="L3099"></a><tt class="py-lineno">3099</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3272" class="py-name"><a title="lxml.cssselect.parse
9550 lxml.etree._ElementTree.parse
9552 lxml.html.ElementSoup.parse
9553 lxml.html.html5parser.parse
9555 lxml.html.soupparser.parse
9556 lxml.objectify.parse
9557 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3272', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt id="link-3273" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3273', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!--hi--><a><!--ho--><b/></a><!--hu-->'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9558 <a name="L3100"></a><tt class="py-lineno">3100</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9559 <a name="L3101"></a><tt class="py-lineno">3101</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3274" class="py-name"><a title="lxml.etree._ElementTree.write_c14n" class="py-name" href="#" onclick="return doclink('link-3274', 'write_c14n', 'link-3233');">write_c14n</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
9560 <a name="L3102"></a><tt class="py-lineno">3102</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9561 <a name="L3103"></a><tt class="py-lineno">3103</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3275" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3275', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!--hi-->\n<a><!--ho--><b></b></a>\n<!--hu-->'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9562 <a name="L3104"></a><tt class="py-lineno">3104</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9563 <a name="L3105"></a><tt class="py-lineno">3105</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9564 <a name="L3106"></a><tt class="py-lineno">3106</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3276" class="py-name"><a title="lxml.etree._ElementTree.write_c14n" class="py-name" href="#" onclick="return doclink('link-3276', 'write_c14n', 'link-3233');">write_c14n</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">with_comments</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
9565 <a name="L3107"></a><tt class="py-lineno">3107</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9566 <a name="L3108"></a><tt class="py-lineno">3108</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3277" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3277', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!--hi-->\n<a><!--ho--><b></b></a>\n<!--hu-->'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9567 <a name="L3109"></a><tt class="py-lineno">3109</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9568 <a name="L3110"></a><tt class="py-lineno">3110</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9569 <a name="L3111"></a><tt class="py-lineno">3111</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3278" class="py-name"><a title="lxml.etree._ElementTree.write_c14n" class="py-name" href="#" onclick="return doclink('link-3278', 'write_c14n', 'link-3233');">write_c14n</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">with_comments</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
9570 <a name="L3112"></a><tt class="py-lineno">3112</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9571 <a name="L3113"></a><tt class="py-lineno">3113</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3279" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3279', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b></b></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9572 <a name="L3114"></a><tt class="py-lineno">3114</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9573 </div><a name="L3115"></a><tt class="py-lineno">3115</tt> <tt class="py-line"> </tt>
9574 <a name="ETreeC14NTestCase.test_c14n_tostring_with_comments"></a><div id="ETreeC14NTestCase.test_c14n_tostring_with_comments-def"><a name="L3116"></a><tt class="py-lineno">3116</tt> <a class="py-toggle" href="#" id="ETreeC14NTestCase.test_c14n_tostring_with_comments-toggle" onclick="return toggle('ETreeC14NTestCase.test_c14n_tostring_with_comments');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeC14NTestCase-class.html#test_c14n_tostring_with_comments">test_c14n_tostring_with_comments</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9575 </div><div id="ETreeC14NTestCase.test_c14n_tostring_with_comments-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeC14NTestCase.test_c14n_tostring_with_comments-expanded"><a name="L3117"></a><tt class="py-lineno">3117</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3280" class="py-name"><a title="lxml.cssselect.parse
9576 lxml.etree._ElementTree.parse
9578 lxml.html.ElementSoup.parse
9579 lxml.html.html5parser.parse
9581 lxml.html.soupparser.parse
9582 lxml.objectify.parse
9583 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3280', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt id="link-3281" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3281', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!--hi--><a><!--ho--><b/></a><!--hu-->'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9584 <a name="L3118"></a><tt class="py-lineno">3118</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt id="link-3282" class="py-name"><a title="lxml.etree
9585 lxml.sax.ElementTreeContentHandler.etree
9586 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9587 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9588 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3282', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3283" class="py-name"><a title="lxml.etree.XSLT.tostring
9590 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3283', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">,</tt> <tt id="link-3284" class="py-name"><a title="lxml.html.FormElement.method" class="py-name" href="#" onclick="return doclink('link-3284', 'method', 'link-2969');">method</a></tt><tt class="py-op">=</tt><tt class="py-string">'c14n'</tt><tt class="py-op">)</tt> </tt>
9591 <a name="L3119"></a><tt class="py-lineno">3119</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3285" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3285', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!--hi-->\n<a><!--ho--><b></b></a>\n<!--hu-->'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9592 <a name="L3120"></a><tt class="py-lineno">3120</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9593 <a name="L3121"></a><tt class="py-lineno">3121</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt id="link-3286" class="py-name"><a title="lxml.etree
9594 lxml.sax.ElementTreeContentHandler.etree
9595 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9596 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9597 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3286', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3287" class="py-name"><a title="lxml.etree.XSLT.tostring
9599 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3287', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">,</tt> <tt id="link-3288" class="py-name"><a title="lxml.html.FormElement.method" class="py-name" href="#" onclick="return doclink('link-3288', 'method', 'link-2969');">method</a></tt><tt class="py-op">=</tt><tt class="py-string">'c14n'</tt><tt class="py-op">,</tt> <tt class="py-name">with_comments</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
9600 <a name="L3122"></a><tt class="py-lineno">3122</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3289" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3289', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!--hi-->\n<a><!--ho--><b></b></a>\n<!--hu-->'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9601 <a name="L3123"></a><tt class="py-lineno">3123</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9602 <a name="L3124"></a><tt class="py-lineno">3124</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt id="link-3290" class="py-name"><a title="lxml.etree
9603 lxml.sax.ElementTreeContentHandler.etree
9604 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9605 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9606 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3290', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3291" class="py-name"><a title="lxml.etree.XSLT.tostring
9608 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3291', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">,</tt> <tt id="link-3292" class="py-name"><a title="lxml.html.FormElement.method" class="py-name" href="#" onclick="return doclink('link-3292', 'method', 'link-2969');">method</a></tt><tt class="py-op">=</tt><tt class="py-string">'c14n'</tt><tt class="py-op">,</tt> <tt class="py-name">with_comments</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
9609 <a name="L3125"></a><tt class="py-lineno">3125</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3293" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3293', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b></b></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9610 <a name="L3126"></a><tt class="py-lineno">3126</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9611 </div><a name="L3127"></a><tt class="py-lineno">3127</tt> <tt class="py-line"> </tt>
9612 <a name="ETreeC14NTestCase.test_c14n_element_tostring_with_comments"></a><div id="ETreeC14NTestCase.test_c14n_element_tostring_with_comments-def"><a name="L3128"></a><tt class="py-lineno">3128</tt> <a class="py-toggle" href="#" id="ETreeC14NTestCase.test_c14n_element_tostring_with_comments-toggle" onclick="return toggle('ETreeC14NTestCase.test_c14n_element_tostring_with_comments');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeC14NTestCase-class.html#test_c14n_element_tostring_with_comments">test_c14n_element_tostring_with_comments</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9613 </div><div id="ETreeC14NTestCase.test_c14n_element_tostring_with_comments-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeC14NTestCase.test_c14n_element_tostring_with_comments-expanded"><a name="L3129"></a><tt class="py-lineno">3129</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3294" class="py-name"><a title="lxml.cssselect.parse
9614 lxml.etree._ElementTree.parse
9616 lxml.html.ElementSoup.parse
9617 lxml.html.html5parser.parse
9619 lxml.html.soupparser.parse
9620 lxml.objectify.parse
9621 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3294', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt id="link-3295" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3295', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<!--hi--><a><!--ho--><b/></a><!--hu-->'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9622 <a name="L3130"></a><tt class="py-lineno">3130</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt id="link-3296" class="py-name"><a title="lxml.etree
9623 lxml.sax.ElementTreeContentHandler.etree
9624 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9625 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9626 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3296', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3297" class="py-name"><a title="lxml.etree.XSLT.tostring
9628 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3297', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3298" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-3298', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-3299" class="py-name"><a title="lxml.html.FormElement.method" class="py-name" href="#" onclick="return doclink('link-3299', 'method', 'link-2969');">method</a></tt><tt class="py-op">=</tt><tt class="py-string">'c14n'</tt><tt class="py-op">)</tt> </tt>
9629 <a name="L3131"></a><tt class="py-lineno">3131</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3300" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3300', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><!--ho--><b></b></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9630 <a name="L3132"></a><tt class="py-lineno">3132</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9631 <a name="L3133"></a><tt class="py-lineno">3133</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt id="link-3301" class="py-name"><a title="lxml.etree
9632 lxml.sax.ElementTreeContentHandler.etree
9633 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9634 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9635 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3301', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3302" class="py-name"><a title="lxml.etree.XSLT.tostring
9637 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3302', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3303" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-3303', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-3304" class="py-name"><a title="lxml.html.FormElement.method" class="py-name" href="#" onclick="return doclink('link-3304', 'method', 'link-2969');">method</a></tt><tt class="py-op">=</tt><tt class="py-string">'c14n'</tt><tt class="py-op">,</tt> <tt class="py-name">with_comments</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
9638 <a name="L3134"></a><tt class="py-lineno">3134</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3305" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3305', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><!--ho--><b></b></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9639 <a name="L3135"></a><tt class="py-lineno">3135</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9640 <a name="L3136"></a><tt class="py-lineno">3136</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt id="link-3306" class="py-name"><a title="lxml.etree
9641 lxml.sax.ElementTreeContentHandler.etree
9642 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9643 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9644 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3306', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3307" class="py-name"><a title="lxml.etree.XSLT.tostring
9646 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3307', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3308" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-3308', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-3309" class="py-name"><a title="lxml.html.FormElement.method" class="py-name" href="#" onclick="return doclink('link-3309', 'method', 'link-2969');">method</a></tt><tt class="py-op">=</tt><tt class="py-string">'c14n'</tt><tt class="py-op">,</tt> <tt class="py-name">with_comments</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
9647 <a name="L3137"></a><tt class="py-lineno">3137</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3310" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3310', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b></b></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9648 <a name="L3138"></a><tt class="py-lineno">3138</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9649 </div><a name="L3139"></a><tt class="py-lineno">3139</tt> <tt class="py-line"> </tt>
9650 <a name="ETreeC14NTestCase.test_c14n_exclusive"></a><div id="ETreeC14NTestCase.test_c14n_exclusive-def"><a name="L3140"></a><tt class="py-lineno">3140</tt> <a class="py-toggle" href="#" id="ETreeC14NTestCase.test_c14n_exclusive-toggle" onclick="return toggle('ETreeC14NTestCase.test_c14n_exclusive');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeC14NTestCase-class.html#test_c14n_exclusive">test_c14n_exclusive</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9651 </div><div id="ETreeC14NTestCase.test_c14n_exclusive-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeC14NTestCase.test_c14n_exclusive-expanded"><a name="L3141"></a><tt class="py-lineno">3141</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3311" class="py-name"><a title="lxml.cssselect.parse
9652 lxml.etree._ElementTree.parse
9654 lxml.html.ElementSoup.parse
9655 lxml.html.html5parser.parse
9657 lxml.html.soupparser.parse
9658 lxml.objectify.parse
9659 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3311', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt id="link-3312" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3312', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt> </tt>
9660 <a name="L3142"></a><tt class="py-lineno">3142</tt> <tt class="py-line"> <tt class="py-string">'<a xmlns="http://abc" xmlns:y="http://bcd" xmlns:z="http://cde"><z:b/></a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9661 <a name="L3143"></a><tt class="py-lineno">3143</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9662 <a name="L3144"></a><tt class="py-lineno">3144</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3313" class="py-name"><a title="lxml.etree._ElementTree.write_c14n" class="py-name" href="#" onclick="return doclink('link-3313', 'write_c14n', 'link-3233');">write_c14n</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
9663 <a name="L3145"></a><tt class="py-lineno">3145</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9664 <a name="L3146"></a><tt class="py-lineno">3146</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3314" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3314', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a xmlns="http://abc" xmlns:y="http://bcd" xmlns:z="http://cde"><z:b></z:b></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9665 <a name="L3147"></a><tt class="py-lineno">3147</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9666 <a name="L3148"></a><tt class="py-lineno">3148</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9667 <a name="L3149"></a><tt class="py-lineno">3149</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3315" class="py-name"><a title="lxml.etree._ElementTree.write_c14n" class="py-name" href="#" onclick="return doclink('link-3315', 'write_c14n', 'link-3233');">write_c14n</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">exclusive</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
9668 <a name="L3150"></a><tt class="py-lineno">3150</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9669 <a name="L3151"></a><tt class="py-lineno">3151</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3316" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3316', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a xmlns="http://abc" xmlns:y="http://bcd" xmlns:z="http://cde"><z:b></z:b></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9670 <a name="L3152"></a><tt class="py-lineno">3152</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9671 <a name="L3153"></a><tt class="py-lineno">3153</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9672 <a name="L3154"></a><tt class="py-lineno">3154</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3317" class="py-name"><a title="lxml.etree._ElementTree.write_c14n" class="py-name" href="#" onclick="return doclink('link-3317', 'write_c14n', 'link-3233');">write_c14n</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">exclusive</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
9673 <a name="L3155"></a><tt class="py-lineno">3155</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9674 <a name="L3156"></a><tt class="py-lineno">3156</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3318" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3318', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a xmlns="http://abc"><z:b xmlns:z="http://cde"></z:b></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9675 <a name="L3157"></a><tt class="py-lineno">3157</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9676 </div><a name="L3158"></a><tt class="py-lineno">3158</tt> <tt class="py-line"> </tt>
9677 <a name="ETreeC14NTestCase.test_c14n_tostring_exclusive"></a><div id="ETreeC14NTestCase.test_c14n_tostring_exclusive-def"><a name="L3159"></a><tt class="py-lineno">3159</tt> <a class="py-toggle" href="#" id="ETreeC14NTestCase.test_c14n_tostring_exclusive-toggle" onclick="return toggle('ETreeC14NTestCase.test_c14n_tostring_exclusive');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeC14NTestCase-class.html#test_c14n_tostring_exclusive">test_c14n_tostring_exclusive</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9678 </div><div id="ETreeC14NTestCase.test_c14n_tostring_exclusive-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeC14NTestCase.test_c14n_tostring_exclusive-expanded"><a name="L3160"></a><tt class="py-lineno">3160</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3319" class="py-name"><a title="lxml.cssselect.parse
9679 lxml.etree._ElementTree.parse
9681 lxml.html.ElementSoup.parse
9682 lxml.html.html5parser.parse
9684 lxml.html.soupparser.parse
9685 lxml.objectify.parse
9686 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3319', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt id="link-3320" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3320', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt> </tt>
9687 <a name="L3161"></a><tt class="py-lineno">3161</tt> <tt class="py-line"> <tt class="py-string">'<a xmlns="http://abc" xmlns:y="http://bcd" xmlns:z="http://cde"><z:b/></a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9688 <a name="L3162"></a><tt class="py-lineno">3162</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt id="link-3321" class="py-name"><a title="lxml.etree
9689 lxml.sax.ElementTreeContentHandler.etree
9690 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9691 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9692 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3321', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3322" class="py-name"><a title="lxml.etree.XSLT.tostring
9694 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3322', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">,</tt> <tt id="link-3323" class="py-name"><a title="lxml.html.FormElement.method" class="py-name" href="#" onclick="return doclink('link-3323', 'method', 'link-2969');">method</a></tt><tt class="py-op">=</tt><tt class="py-string">'c14n'</tt><tt class="py-op">)</tt> </tt>
9695 <a name="L3163"></a><tt class="py-lineno">3163</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3324" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3324', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a xmlns="http://abc" xmlns:y="http://bcd" xmlns:z="http://cde"><z:b></z:b></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9696 <a name="L3164"></a><tt class="py-lineno">3164</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9697 <a name="L3165"></a><tt class="py-lineno">3165</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt id="link-3325" class="py-name"><a title="lxml.etree
9698 lxml.sax.ElementTreeContentHandler.etree
9699 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9700 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9701 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3325', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3326" class="py-name"><a title="lxml.etree.XSLT.tostring
9703 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3326', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">,</tt> <tt id="link-3327" class="py-name"><a title="lxml.html.FormElement.method" class="py-name" href="#" onclick="return doclink('link-3327', 'method', 'link-2969');">method</a></tt><tt class="py-op">=</tt><tt class="py-string">'c14n'</tt><tt class="py-op">,</tt> <tt class="py-name">exclusive</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
9704 <a name="L3166"></a><tt class="py-lineno">3166</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3328" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3328', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a xmlns="http://abc" xmlns:y="http://bcd" xmlns:z="http://cde"><z:b></z:b></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9705 <a name="L3167"></a><tt class="py-lineno">3167</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9706 <a name="L3168"></a><tt class="py-lineno">3168</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt id="link-3329" class="py-name"><a title="lxml.etree
9707 lxml.sax.ElementTreeContentHandler.etree
9708 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9709 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9710 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3329', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3330" class="py-name"><a title="lxml.etree.XSLT.tostring
9712 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3330', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">,</tt> <tt id="link-3331" class="py-name"><a title="lxml.html.FormElement.method" class="py-name" href="#" onclick="return doclink('link-3331', 'method', 'link-2969');">method</a></tt><tt class="py-op">=</tt><tt class="py-string">'c14n'</tt><tt class="py-op">,</tt> <tt class="py-name">exclusive</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
9713 <a name="L3169"></a><tt class="py-lineno">3169</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3332" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3332', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a xmlns="http://abc"><z:b xmlns:z="http://cde"></z:b></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9714 <a name="L3170"></a><tt class="py-lineno">3170</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9715 </div><a name="L3171"></a><tt class="py-lineno">3171</tt> <tt class="py-line"> </tt>
9716 <a name="ETreeC14NTestCase.test_c14n_element_tostring_exclusive"></a><div id="ETreeC14NTestCase.test_c14n_element_tostring_exclusive-def"><a name="L3172"></a><tt class="py-lineno">3172</tt> <a class="py-toggle" href="#" id="ETreeC14NTestCase.test_c14n_element_tostring_exclusive-toggle" onclick="return toggle('ETreeC14NTestCase.test_c14n_element_tostring_exclusive');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeC14NTestCase-class.html#test_c14n_element_tostring_exclusive">test_c14n_element_tostring_exclusive</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9717 </div><div id="ETreeC14NTestCase.test_c14n_element_tostring_exclusive-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeC14NTestCase.test_c14n_element_tostring_exclusive-expanded"><a name="L3173"></a><tt class="py-lineno">3173</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3333" class="py-name"><a title="lxml.cssselect.parse
9718 lxml.etree._ElementTree.parse
9720 lxml.html.ElementSoup.parse
9721 lxml.html.html5parser.parse
9723 lxml.html.soupparser.parse
9724 lxml.objectify.parse
9725 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3333', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt id="link-3334" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3334', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt> </tt>
9726 <a name="L3174"></a><tt class="py-lineno">3174</tt> <tt class="py-line"> <tt class="py-string">'<a xmlns="http://abc" xmlns:y="http://bcd" xmlns:z="http://cde"><z:b/></a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9727 <a name="L3175"></a><tt class="py-lineno">3175</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt id="link-3335" class="py-name"><a title="lxml.etree
9728 lxml.sax.ElementTreeContentHandler.etree
9729 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9730 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9731 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3335', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3336" class="py-name"><a title="lxml.etree.XSLT.tostring
9733 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3336', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3337" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-3337', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-3338" class="py-name"><a title="lxml.html.FormElement.method" class="py-name" href="#" onclick="return doclink('link-3338', 'method', 'link-2969');">method</a></tt><tt class="py-op">=</tt><tt class="py-string">'c14n'</tt><tt class="py-op">)</tt> </tt>
9734 <a name="L3176"></a><tt class="py-lineno">3176</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3339" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3339', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a xmlns="http://abc" xmlns:y="http://bcd" xmlns:z="http://cde"><z:b></z:b></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9735 <a name="L3177"></a><tt class="py-lineno">3177</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9736 <a name="L3178"></a><tt class="py-lineno">3178</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt id="link-3340" class="py-name"><a title="lxml.etree
9737 lxml.sax.ElementTreeContentHandler.etree
9738 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9739 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9740 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3340', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3341" class="py-name"><a title="lxml.etree.XSLT.tostring
9742 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3341', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3342" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-3342', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-3343" class="py-name"><a title="lxml.html.FormElement.method" class="py-name" href="#" onclick="return doclink('link-3343', 'method', 'link-2969');">method</a></tt><tt class="py-op">=</tt><tt class="py-string">'c14n'</tt><tt class="py-op">,</tt> <tt class="py-name">exclusive</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
9743 <a name="L3179"></a><tt class="py-lineno">3179</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3344" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3344', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a xmlns="http://abc" xmlns:y="http://bcd" xmlns:z="http://cde"><z:b></z:b></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9744 <a name="L3180"></a><tt class="py-lineno">3180</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9745 <a name="L3181"></a><tt class="py-lineno">3181</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt id="link-3345" class="py-name"><a title="lxml.etree
9746 lxml.sax.ElementTreeContentHandler.etree
9747 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9748 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9749 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3345', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3346" class="py-name"><a title="lxml.etree.XSLT.tostring
9751 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3346', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3347" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-3347', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-3348" class="py-name"><a title="lxml.html.FormElement.method" class="py-name" href="#" onclick="return doclink('link-3348', 'method', 'link-2969');">method</a></tt><tt class="py-op">=</tt><tt class="py-string">'c14n'</tt><tt class="py-op">,</tt> <tt class="py-name">exclusive</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
9752 <a name="L3182"></a><tt class="py-lineno">3182</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3349" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3349', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a xmlns="http://abc"><z:b xmlns:z="http://cde"></z:b></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9753 <a name="L3183"></a><tt class="py-lineno">3183</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9754 <a name="L3184"></a><tt class="py-lineno">3184</tt> <tt class="py-line"> </tt>
9755 <a name="L3185"></a><tt class="py-lineno">3185</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt id="link-3350" class="py-name"><a title="lxml.etree
9756 lxml.sax.ElementTreeContentHandler.etree
9757 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9758 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9759 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3350', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3351" class="py-name"><a title="lxml.etree.XSLT.tostring
9761 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3351', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3352" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-3352', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt id="link-3353" class="py-name"><a title="lxml.html.FormElement.method" class="py-name" href="#" onclick="return doclink('link-3353', 'method', 'link-2969');">method</a></tt><tt class="py-op">=</tt><tt class="py-string">'c14n'</tt><tt class="py-op">,</tt> <tt class="py-name">exclusive</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
9762 <a name="L3186"></a><tt class="py-lineno">3186</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3354" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3354', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<z:b xmlns="http://abc" xmlns:y="http://bcd" xmlns:z="http://cde"></z:b>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9763 <a name="L3187"></a><tt class="py-lineno">3187</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9764 <a name="L3188"></a><tt class="py-lineno">3188</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt id="link-3355" class="py-name"><a title="lxml.etree
9765 lxml.sax.ElementTreeContentHandler.etree
9766 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9767 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9768 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3355', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3356" class="py-name"><a title="lxml.etree.XSLT.tostring
9770 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3356', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3357" class="py-name"><a title="lxml.etree._ElementTree.getroot" class="py-name" href="#" onclick="return doclink('link-3357', 'getroot', 'link-700');">getroot</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt id="link-3358" class="py-name"><a title="lxml.html.FormElement.method" class="py-name" href="#" onclick="return doclink('link-3358', 'method', 'link-2969');">method</a></tt><tt class="py-op">=</tt><tt class="py-string">'c14n'</tt><tt class="py-op">,</tt> <tt class="py-name">exclusive</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
9771 <a name="L3189"></a><tt class="py-lineno">3189</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3359" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3359', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<z:b xmlns:z="http://cde"></z:b>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9772 <a name="L3190"></a><tt class="py-lineno">3190</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9773 </div></div><a name="L3191"></a><tt class="py-lineno">3191</tt> <tt class="py-line"> </tt>
9774 <a name="L3192"></a><tt class="py-lineno">3192</tt> <tt class="py-line"> </tt>
9775 <a name="ETreeWriteTestCase"></a><div id="ETreeWriteTestCase-def"><a name="L3193"></a><tt class="py-lineno">3193</tt> <a class="py-toggle" href="#" id="ETreeWriteTestCase-toggle" onclick="return toggle('ETreeWriteTestCase');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeWriteTestCase-class.html">ETreeWriteTestCase</a><tt class="py-op">(</tt><tt class="py-base-class">HelperTestCase</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9776 </div><div id="ETreeWriteTestCase-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="ETreeWriteTestCase-expanded"><a name="ETreeWriteTestCase.test_write"></a><div id="ETreeWriteTestCase.test_write-def"><a name="L3194"></a><tt class="py-lineno">3194</tt> <a class="py-toggle" href="#" id="ETreeWriteTestCase.test_write-toggle" onclick="return toggle('ETreeWriteTestCase.test_write');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeWriteTestCase-class.html#test_write">test_write</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9777 </div><div id="ETreeWriteTestCase.test_write-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeWriteTestCase.test_write-expanded"><a name="L3195"></a><tt class="py-lineno">3195</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3360" class="py-name"><a title="lxml.cssselect.parse
9778 lxml.etree._ElementTree.parse
9780 lxml.html.ElementSoup.parse
9781 lxml.html.html5parser.parse
9783 lxml.html.soupparser.parse
9784 lxml.objectify.parse
9785 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3360', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt id="link-3361" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3361', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b/></a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9786 <a name="L3196"></a><tt class="py-lineno">3196</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9787 <a name="L3197"></a><tt class="py-lineno">3197</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3362" class="py-name"><a title="lxml.etree._ElementTree.write" class="py-name" href="#" onclick="return doclink('link-3362', 'write', 'link-3172');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
9788 <a name="L3198"></a><tt class="py-lineno">3198</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9789 <a name="L3199"></a><tt class="py-lineno">3199</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3363" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3363', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b/></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9790 <a name="L3200"></a><tt class="py-lineno">3200</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9791 </div><a name="L3201"></a><tt class="py-lineno">3201</tt> <tt class="py-line"> </tt>
9792 <a name="ETreeWriteTestCase.test_write_gzip"></a><div id="ETreeWriteTestCase.test_write_gzip-def"><a name="L3202"></a><tt class="py-lineno">3202</tt> <a class="py-toggle" href="#" id="ETreeWriteTestCase.test_write_gzip-toggle" onclick="return toggle('ETreeWriteTestCase.test_write_gzip');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeWriteTestCase-class.html#test_write_gzip">test_write_gzip</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9793 </div><div id="ETreeWriteTestCase.test_write_gzip-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeWriteTestCase.test_write_gzip-expanded"><a name="L3203"></a><tt class="py-lineno">3203</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3364" class="py-name"><a title="lxml.cssselect.parse
9794 lxml.etree._ElementTree.parse
9796 lxml.html.ElementSoup.parse
9797 lxml.html.html5parser.parse
9799 lxml.html.soupparser.parse
9800 lxml.objectify.parse
9801 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3364', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt id="link-3365" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3365', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a>'</tt><tt class="py-op">+</tt><tt class="py-string">'<b/>'</tt><tt class="py-op">*</tt><tt class="py-number">200</tt><tt class="py-op">+</tt><tt class="py-string">'</a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9802 <a name="L3204"></a><tt class="py-lineno">3204</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9803 <a name="L3205"></a><tt class="py-lineno">3205</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3366" class="py-name"><a title="lxml.etree._ElementTree.write" class="py-name" href="#" onclick="return doclink('link-3366', 'write', 'link-3172');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">compression</tt><tt class="py-op">=</tt><tt class="py-number">9</tt><tt class="py-op">)</tt> </tt>
9804 <a name="L3206"></a><tt class="py-lineno">3206</tt> <tt class="py-line"> <tt class="py-name">gzfile</tt> <tt class="py-op">=</tt> <tt class="py-name">gzip</tt><tt class="py-op">.</tt><tt class="py-name">GzipFile</tt><tt class="py-op">(</tt><tt class="py-name">fileobj</tt><tt class="py-op">=</tt><tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9805 <a name="L3207"></a><tt class="py-lineno">3207</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
9806 <a name="L3208"></a><tt class="py-lineno">3208</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-name">gzfile</tt><tt class="py-op">.</tt><tt id="link-3367" class="py-name"><a title="lxml.tests.common_imports.LargeFileLike.read
9807 lxml.tests.common_imports.SillyFileLike.read" class="py-name" href="#" onclick="return doclink('link-3367', 'read', 'link-3238');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9808 <a name="L3209"></a><tt class="py-lineno">3209</tt> <tt class="py-line"> <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
9809 <a name="L3210"></a><tt class="py-lineno">3210</tt> <tt class="py-line"> <tt class="py-name">gzfile</tt><tt class="py-op">.</tt><tt id="link-3368" class="py-name"><a title="lxml.etree.TreeBuilder.close
9810 lxml.etree._FeedParser.close" class="py-name" href="#" onclick="return doclink('link-3368', 'close', 'link-937');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9811 <a name="L3211"></a><tt class="py-lineno">3211</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3369" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3369', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a>'</tt><tt class="py-op">+</tt><tt class="py-string">'<b/>'</tt><tt class="py-op">*</tt><tt class="py-number">200</tt><tt class="py-op">+</tt><tt class="py-string">'</a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9812 <a name="L3212"></a><tt class="py-lineno">3212</tt> <tt class="py-line"> <tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
9813 </div><a name="L3213"></a><tt class="py-lineno">3213</tt> <tt class="py-line"> </tt>
9814 <a name="ETreeWriteTestCase.test_write_gzip_level"></a><div id="ETreeWriteTestCase.test_write_gzip_level-def"><a name="L3214"></a><tt class="py-lineno">3214</tt> <a class="py-toggle" href="#" id="ETreeWriteTestCase.test_write_gzip_level-toggle" onclick="return toggle('ETreeWriteTestCase.test_write_gzip_level');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeWriteTestCase-class.html#test_write_gzip_level">test_write_gzip_level</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9815 </div><div id="ETreeWriteTestCase.test_write_gzip_level-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeWriteTestCase.test_write_gzip_level-expanded"><a name="L3215"></a><tt class="py-lineno">3215</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3370" class="py-name"><a title="lxml.cssselect.parse
9816 lxml.etree._ElementTree.parse
9818 lxml.html.ElementSoup.parse
9819 lxml.html.html5parser.parse
9821 lxml.html.soupparser.parse
9822 lxml.objectify.parse
9823 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3370', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt id="link-3371" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3371', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a>'</tt><tt class="py-op">+</tt><tt class="py-string">'<b/>'</tt><tt class="py-op">*</tt><tt class="py-number">200</tt><tt class="py-op">+</tt><tt class="py-string">'</a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9824 <a name="L3216"></a><tt class="py-lineno">3216</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9825 <a name="L3217"></a><tt class="py-lineno">3217</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3372" class="py-name"><a title="lxml.etree._ElementTree.write" class="py-name" href="#" onclick="return doclink('link-3372', 'write', 'link-3172');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">compression</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
9826 <a name="L3218"></a><tt class="py-lineno">3218</tt> <tt class="py-line"> <tt class="py-name">s0</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9827 <a name="L3219"></a><tt class="py-lineno">3219</tt> <tt class="py-line"> </tt>
9828 <a name="L3220"></a><tt class="py-lineno">3220</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9829 <a name="L3221"></a><tt class="py-lineno">3221</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3373" class="py-name"><a title="lxml.etree._ElementTree.write" class="py-name" href="#" onclick="return doclink('link-3373', 'write', 'link-3172');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
9830 <a name="L3222"></a><tt class="py-lineno">3222</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">s0</tt><tt class="py-op">)</tt> </tt>
9831 <a name="L3223"></a><tt class="py-lineno">3223</tt> <tt class="py-line"> </tt>
9832 <a name="L3224"></a><tt class="py-lineno">3224</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9833 <a name="L3225"></a><tt class="py-lineno">3225</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3374" class="py-name"><a title="lxml.etree._ElementTree.write" class="py-name" href="#" onclick="return doclink('link-3374', 'write', 'link-3172');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">compression</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
9834 <a name="L3226"></a><tt class="py-lineno">3226</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9835 <a name="L3227"></a><tt class="py-lineno">3227</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3375" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-3375', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">s</tt><tt class="py-op">)</tt> <tt class="py-op"><=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">s0</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9836 <a name="L3228"></a><tt class="py-lineno">3228</tt> <tt class="py-line"> <tt class="py-name">gzfile</tt> <tt class="py-op">=</tt> <tt class="py-name">gzip</tt><tt class="py-op">.</tt><tt class="py-name">GzipFile</tt><tt class="py-op">(</tt><tt class="py-name">fileobj</tt><tt class="py-op">=</tt><tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-name">s</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9837 <a name="L3229"></a><tt class="py-lineno">3229</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
9838 <a name="L3230"></a><tt class="py-lineno">3230</tt> <tt class="py-line"> <tt class="py-name">s1</tt> <tt class="py-op">=</tt> <tt class="py-name">gzfile</tt><tt class="py-op">.</tt><tt id="link-3376" class="py-name"><a title="lxml.tests.common_imports.LargeFileLike.read
9839 lxml.tests.common_imports.SillyFileLike.read" class="py-name" href="#" onclick="return doclink('link-3376', 'read', 'link-3238');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9840 <a name="L3231"></a><tt class="py-lineno">3231</tt> <tt class="py-line"> <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
9841 <a name="L3232"></a><tt class="py-lineno">3232</tt> <tt class="py-line"> <tt class="py-name">gzfile</tt><tt class="py-op">.</tt><tt id="link-3377" class="py-name"><a title="lxml.etree.TreeBuilder.close
9842 lxml.etree._FeedParser.close" class="py-name" href="#" onclick="return doclink('link-3377', 'close', 'link-937');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9843 <a name="L3233"></a><tt class="py-lineno">3233</tt> <tt class="py-line"> </tt>
9844 <a name="L3234"></a><tt class="py-lineno">3234</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9845 <a name="L3235"></a><tt class="py-lineno">3235</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3378" class="py-name"><a title="lxml.etree._ElementTree.write" class="py-name" href="#" onclick="return doclink('link-3378', 'write', 'link-3172');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">,</tt> <tt class="py-name">compression</tt><tt class="py-op">=</tt><tt class="py-number">9</tt><tt class="py-op">)</tt> </tt>
9846 <a name="L3236"></a><tt class="py-lineno">3236</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9847 <a name="L3237"></a><tt class="py-lineno">3237</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3379" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-3379', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">s</tt><tt class="py-op">)</tt> <tt class="py-op"><=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">s0</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9848 <a name="L3238"></a><tt class="py-lineno">3238</tt> <tt class="py-line"> <tt class="py-name">gzfile</tt> <tt class="py-op">=</tt> <tt class="py-name">gzip</tt><tt class="py-op">.</tt><tt class="py-name">GzipFile</tt><tt class="py-op">(</tt><tt class="py-name">fileobj</tt><tt class="py-op">=</tt><tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-name">s</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9849 <a name="L3239"></a><tt class="py-lineno">3239</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
9850 <a name="L3240"></a><tt class="py-lineno">3240</tt> <tt class="py-line"> <tt class="py-name">s9</tt> <tt class="py-op">=</tt> <tt class="py-name">gzfile</tt><tt class="py-op">.</tt><tt id="link-3380" class="py-name"><a title="lxml.tests.common_imports.LargeFileLike.read
9851 lxml.tests.common_imports.SillyFileLike.read" class="py-name" href="#" onclick="return doclink('link-3380', 'read', 'link-3238');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9852 <a name="L3241"></a><tt class="py-lineno">3241</tt> <tt class="py-line"> <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
9853 <a name="L3242"></a><tt class="py-lineno">3242</tt> <tt class="py-line"> <tt class="py-name">gzfile</tt><tt class="py-op">.</tt><tt id="link-3381" class="py-name"><a title="lxml.etree.TreeBuilder.close
9854 lxml.etree._FeedParser.close" class="py-name" href="#" onclick="return doclink('link-3381', 'close', 'link-937');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9855 <a name="L3243"></a><tt class="py-lineno">3243</tt> <tt class="py-line"> </tt>
9856 <a name="L3244"></a><tt class="py-lineno">3244</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3382" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3382', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a>'</tt><tt class="py-op">+</tt><tt class="py-string">'<b/>'</tt><tt class="py-op">*</tt><tt class="py-number">200</tt><tt class="py-op">+</tt><tt class="py-string">'</a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9857 <a name="L3245"></a><tt class="py-lineno">3245</tt> <tt class="py-line"> <tt class="py-name">s0</tt><tt class="py-op">)</tt> </tt>
9858 <a name="L3246"></a><tt class="py-lineno">3246</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3383" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3383', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a>'</tt><tt class="py-op">+</tt><tt class="py-string">'<b/>'</tt><tt class="py-op">*</tt><tt class="py-number">200</tt><tt class="py-op">+</tt><tt class="py-string">'</a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9859 <a name="L3247"></a><tt class="py-lineno">3247</tt> <tt class="py-line"> <tt class="py-name">s1</tt><tt class="py-op">)</tt> </tt>
9860 <a name="L3248"></a><tt class="py-lineno">3248</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3384" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3384', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a>'</tt><tt class="py-op">+</tt><tt class="py-string">'<b/>'</tt><tt class="py-op">*</tt><tt class="py-number">200</tt><tt class="py-op">+</tt><tt class="py-string">'</a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9861 <a name="L3249"></a><tt class="py-lineno">3249</tt> <tt class="py-line"> <tt class="py-name">s9</tt><tt class="py-op">)</tt> </tt>
9862 </div><a name="L3250"></a><tt class="py-lineno">3250</tt> <tt class="py-line"> </tt>
9863 <a name="ETreeWriteTestCase.test_write_file"></a><div id="ETreeWriteTestCase.test_write_file-def"><a name="L3251"></a><tt class="py-lineno">3251</tt> <a class="py-toggle" href="#" id="ETreeWriteTestCase.test_write_file-toggle" onclick="return toggle('ETreeWriteTestCase.test_write_file');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeWriteTestCase-class.html#test_write_file">test_write_file</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9864 </div><div id="ETreeWriteTestCase.test_write_file-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeWriteTestCase.test_write_file-expanded"><a name="L3252"></a><tt class="py-lineno">3252</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3385" class="py-name"><a title="lxml.cssselect.parse
9865 lxml.etree._ElementTree.parse
9867 lxml.html.ElementSoup.parse
9868 lxml.html.html5parser.parse
9870 lxml.html.soupparser.parse
9871 lxml.objectify.parse
9872 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3385', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt id="link-3386" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3386', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b/></a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9873 <a name="L3253"></a><tt class="py-lineno">3253</tt> <tt class="py-line"> <tt id="link-3387" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker.handle
9874 lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker.handle
9875 lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker.handle
9876 lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker.handle
9877 lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker.handle" class="py-name" href="#" onclick="return doclink('link-3387', 'handle', 'link-3243');">handle</a></tt><tt class="py-op">,</tt> <tt id="link-3388" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3388', 'filename', 'link-3180');">filename</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tempfile</tt><tt class="py-op">.</tt><tt class="py-name">mkstemp</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9878 <a name="L3254"></a><tt class="py-lineno">3254</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
9879 <a name="L3255"></a><tt class="py-lineno">3255</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3389" class="py-name"><a title="lxml.etree._ElementTree.write" class="py-name" href="#" onclick="return doclink('link-3389', 'write', 'link-3172');">write</a></tt><tt class="py-op">(</tt><tt id="link-3390" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3390', 'filename', 'link-3180');">filename</a></tt><tt class="py-op">)</tt> </tt>
9880 <a name="L3256"></a><tt class="py-lineno">3256</tt> <tt class="py-line"> <tt id="link-3391" class="py-name"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-3391', 'data', 'link-971');">data</a></tt> <tt class="py-op">=</tt> <tt id="link-3392" class="py-name"><a title="lxml.tests.common_imports.read_file" class="py-name" href="#" onclick="return doclink('link-3392', 'read_file', 'link-13');">read_file</a></tt><tt class="py-op">(</tt><tt id="link-3393" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3393', 'filename', 'link-3180');">filename</a></tt><tt class="py-op">,</tt> <tt class="py-string">'rb'</tt><tt class="py-op">)</tt> </tt>
9881 <a name="L3257"></a><tt class="py-lineno">3257</tt> <tt class="py-line"> <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
9882 <a name="L3258"></a><tt class="py-lineno">3258</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-3394" class="py-name"><a title="lxml.etree.TreeBuilder.close
9883 lxml.etree._FeedParser.close" class="py-name" href="#" onclick="return doclink('link-3394', 'close', 'link-937');">close</a></tt><tt class="py-op">(</tt><tt id="link-3395" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker.handle
9884 lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker.handle
9885 lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker.handle
9886 lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker.handle
9887 lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker.handle" class="py-name" href="#" onclick="return doclink('link-3395', 'handle', 'link-3243');">handle</a></tt><tt class="py-op">)</tt> </tt>
9888 <a name="L3259"></a><tt class="py-lineno">3259</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-3396" class="py-name"><a title="lxml.etree._Element.remove
9889 lxml.etree._ResolverRegistry.remove
9890 lxml.html.CheckboxValues.remove
9891 lxml.html.MultipleSelectOptions.remove" class="py-name" href="#" onclick="return doclink('link-3396', 'remove', 'link-607');">remove</a></tt><tt class="py-op">(</tt><tt id="link-3397" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3397', 'filename', 'link-3180');">filename</a></tt><tt class="py-op">)</tt> </tt>
9892 <a name="L3260"></a><tt class="py-lineno">3260</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3398" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3398', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a><b/></a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9893 <a name="L3261"></a><tt class="py-lineno">3261</tt> <tt class="py-line"> <tt id="link-3399" class="py-name"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-3399', 'data', 'link-971');">data</a></tt><tt class="py-op">)</tt> </tt>
9894 </div><a name="L3262"></a><tt class="py-lineno">3262</tt> <tt class="py-line"> </tt>
9895 <a name="ETreeWriteTestCase.test_write_file_gzip"></a><div id="ETreeWriteTestCase.test_write_file_gzip-def"><a name="L3263"></a><tt class="py-lineno">3263</tt> <a class="py-toggle" href="#" id="ETreeWriteTestCase.test_write_file_gzip-toggle" onclick="return toggle('ETreeWriteTestCase.test_write_file_gzip');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeWriteTestCase-class.html#test_write_file_gzip">test_write_file_gzip</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9896 </div><div id="ETreeWriteTestCase.test_write_file_gzip-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeWriteTestCase.test_write_file_gzip-expanded"><a name="L3264"></a><tt class="py-lineno">3264</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3400" class="py-name"><a title="lxml.cssselect.parse
9897 lxml.etree._ElementTree.parse
9899 lxml.html.ElementSoup.parse
9900 lxml.html.html5parser.parse
9902 lxml.html.soupparser.parse
9903 lxml.objectify.parse
9904 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3400', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt id="link-3401" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3401', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a>'</tt><tt class="py-op">+</tt><tt class="py-string">'<b/>'</tt><tt class="py-op">*</tt><tt class="py-number">200</tt><tt class="py-op">+</tt><tt class="py-string">'</a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9905 <a name="L3265"></a><tt class="py-lineno">3265</tt> <tt class="py-line"> <tt id="link-3402" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker.handle
9906 lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker.handle
9907 lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker.handle
9908 lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker.handle
9909 lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker.handle" class="py-name" href="#" onclick="return doclink('link-3402', 'handle', 'link-3243');">handle</a></tt><tt class="py-op">,</tt> <tt id="link-3403" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3403', 'filename', 'link-3180');">filename</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tempfile</tt><tt class="py-op">.</tt><tt class="py-name">mkstemp</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9910 <a name="L3266"></a><tt class="py-lineno">3266</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
9911 <a name="L3267"></a><tt class="py-lineno">3267</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3404" class="py-name"><a title="lxml.etree._ElementTree.write" class="py-name" href="#" onclick="return doclink('link-3404', 'write', 'link-3172');">write</a></tt><tt class="py-op">(</tt><tt id="link-3405" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3405', 'filename', 'link-3180');">filename</a></tt><tt class="py-op">,</tt> <tt class="py-name">compression</tt><tt class="py-op">=</tt><tt class="py-number">9</tt><tt class="py-op">)</tt> </tt>
9912 <a name="L3268"></a><tt class="py-lineno">3268</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">gzip</tt><tt class="py-op">.</tt><tt class="py-name">open</tt><tt class="py-op">(</tt><tt id="link-3406" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3406', 'filename', 'link-3180');">filename</a></tt><tt class="py-op">,</tt> <tt class="py-string">'rb'</tt><tt class="py-op">)</tt> </tt>
9913 <a name="L3269"></a><tt class="py-lineno">3269</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
9914 <a name="L3270"></a><tt class="py-lineno">3270</tt> <tt class="py-line"> <tt id="link-3407" class="py-name"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-3407', 'data', 'link-971');">data</a></tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt id="link-3408" class="py-name"><a title="lxml.tests.common_imports.LargeFileLike.read
9915 lxml.tests.common_imports.SillyFileLike.read" class="py-name" href="#" onclick="return doclink('link-3408', 'read', 'link-3238');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9916 <a name="L3271"></a><tt class="py-lineno">3271</tt> <tt class="py-line"> <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
9917 <a name="L3272"></a><tt class="py-lineno">3272</tt> <tt class="py-line"> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt id="link-3409" class="py-name"><a title="lxml.etree.TreeBuilder.close
9918 lxml.etree._FeedParser.close" class="py-name" href="#" onclick="return doclink('link-3409', 'close', 'link-937');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9919 <a name="L3273"></a><tt class="py-lineno">3273</tt> <tt class="py-line"> <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
9920 <a name="L3274"></a><tt class="py-lineno">3274</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-3410" class="py-name"><a title="lxml.etree.TreeBuilder.close
9921 lxml.etree._FeedParser.close" class="py-name" href="#" onclick="return doclink('link-3410', 'close', 'link-937');">close</a></tt><tt class="py-op">(</tt><tt id="link-3411" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker.handle
9922 lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker.handle
9923 lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker.handle
9924 lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker.handle
9925 lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker.handle" class="py-name" href="#" onclick="return doclink('link-3411', 'handle', 'link-3243');">handle</a></tt><tt class="py-op">)</tt> </tt>
9926 <a name="L3275"></a><tt class="py-lineno">3275</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-3412" class="py-name"><a title="lxml.etree._Element.remove
9927 lxml.etree._ResolverRegistry.remove
9928 lxml.html.CheckboxValues.remove
9929 lxml.html.MultipleSelectOptions.remove" class="py-name" href="#" onclick="return doclink('link-3412', 'remove', 'link-607');">remove</a></tt><tt class="py-op">(</tt><tt id="link-3413" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3413', 'filename', 'link-3180');">filename</a></tt><tt class="py-op">)</tt> </tt>
9930 <a name="L3276"></a><tt class="py-lineno">3276</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3414" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3414', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a>'</tt><tt class="py-op">+</tt><tt class="py-string">'<b/>'</tt><tt class="py-op">*</tt><tt class="py-number">200</tt><tt class="py-op">+</tt><tt class="py-string">'</a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9931 <a name="L3277"></a><tt class="py-lineno">3277</tt> <tt class="py-line"> <tt id="link-3415" class="py-name"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-3415', 'data', 'link-971');">data</a></tt><tt class="py-op">)</tt> </tt>
9932 </div><a name="L3278"></a><tt class="py-lineno">3278</tt> <tt class="py-line"> </tt>
9933 <a name="ETreeWriteTestCase.test_write_file_gzip_parse"></a><div id="ETreeWriteTestCase.test_write_file_gzip_parse-def"><a name="L3279"></a><tt class="py-lineno">3279</tt> <a class="py-toggle" href="#" id="ETreeWriteTestCase.test_write_file_gzip_parse-toggle" onclick="return toggle('ETreeWriteTestCase.test_write_file_gzip_parse');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeWriteTestCase-class.html#test_write_file_gzip_parse">test_write_file_gzip_parse</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9934 </div><div id="ETreeWriteTestCase.test_write_file_gzip_parse-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeWriteTestCase.test_write_file_gzip_parse-expanded"><a name="L3280"></a><tt class="py-lineno">3280</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3416" class="py-name"><a title="lxml.cssselect.parse
9935 lxml.etree._ElementTree.parse
9937 lxml.html.ElementSoup.parse
9938 lxml.html.html5parser.parse
9940 lxml.html.soupparser.parse
9941 lxml.objectify.parse
9942 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3416', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt id="link-3417" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3417', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a>'</tt><tt class="py-op">+</tt><tt class="py-string">'<b/>'</tt><tt class="py-op">*</tt><tt class="py-number">200</tt><tt class="py-op">+</tt><tt class="py-string">'</a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9943 <a name="L3281"></a><tt class="py-lineno">3281</tt> <tt class="py-line"> <tt id="link-3418" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker.handle
9944 lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker.handle
9945 lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker.handle
9946 lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker.handle
9947 lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker.handle" class="py-name" href="#" onclick="return doclink('link-3418', 'handle', 'link-3243');">handle</a></tt><tt class="py-op">,</tt> <tt id="link-3419" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3419', 'filename', 'link-3180');">filename</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tempfile</tt><tt class="py-op">.</tt><tt class="py-name">mkstemp</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9948 <a name="L3282"></a><tt class="py-lineno">3282</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
9949 <a name="L3283"></a><tt class="py-lineno">3283</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3420" class="py-name"><a title="lxml.etree._ElementTree.write" class="py-name" href="#" onclick="return doclink('link-3420', 'write', 'link-3172');">write</a></tt><tt class="py-op">(</tt><tt id="link-3421" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3421', 'filename', 'link-3180');">filename</a></tt><tt class="py-op">,</tt> <tt class="py-name">compression</tt><tt class="py-op">=</tt><tt class="py-number">9</tt><tt class="py-op">)</tt> </tt>
9950 <a name="L3284"></a><tt class="py-lineno">3284</tt> <tt class="py-line"> <tt id="link-3422" class="py-name"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-3422', 'data', 'link-971');">data</a></tt> <tt class="py-op">=</tt> <tt id="link-3423" class="py-name"><a title="lxml.etree
9951 lxml.sax.ElementTreeContentHandler.etree
9952 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9953 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9954 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3423', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3424" class="py-name"><a title="lxml.etree.XSLT.tostring
9956 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3424', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt id="link-3425" class="py-name"><a title="lxml.etree
9957 lxml.sax.ElementTreeContentHandler.etree
9958 lxml.tests.test_elementtree.CElementTreeTestCase.etree
9959 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
9960 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3425', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3426" class="py-name"><a title="lxml.cssselect.parse
9961 lxml.etree._ElementTree.parse
9963 lxml.html.ElementSoup.parse
9964 lxml.html.html5parser.parse
9966 lxml.html.soupparser.parse
9967 lxml.objectify.parse
9968 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3426', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt id="link-3427" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3427', 'filename', 'link-3180');">filename</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9969 <a name="L3285"></a><tt class="py-lineno">3285</tt> <tt class="py-line"> <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
9970 <a name="L3286"></a><tt class="py-lineno">3286</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-3428" class="py-name"><a title="lxml.etree.TreeBuilder.close
9971 lxml.etree._FeedParser.close" class="py-name" href="#" onclick="return doclink('link-3428', 'close', 'link-937');">close</a></tt><tt class="py-op">(</tt><tt id="link-3429" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker.handle
9972 lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker.handle
9973 lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker.handle
9974 lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker.handle
9975 lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker.handle" class="py-name" href="#" onclick="return doclink('link-3429', 'handle', 'link-3243');">handle</a></tt><tt class="py-op">)</tt> </tt>
9976 <a name="L3287"></a><tt class="py-lineno">3287</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-3430" class="py-name"><a title="lxml.etree._Element.remove
9977 lxml.etree._ResolverRegistry.remove
9978 lxml.html.CheckboxValues.remove
9979 lxml.html.MultipleSelectOptions.remove" class="py-name" href="#" onclick="return doclink('link-3430', 'remove', 'link-607');">remove</a></tt><tt class="py-op">(</tt><tt id="link-3431" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3431', 'filename', 'link-3180');">filename</a></tt><tt class="py-op">)</tt> </tt>
9980 <a name="L3288"></a><tt class="py-lineno">3288</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3432" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3432', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a>'</tt><tt class="py-op">+</tt><tt class="py-string">'<b/>'</tt><tt class="py-op">*</tt><tt class="py-number">200</tt><tt class="py-op">+</tt><tt class="py-string">'</a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
9981 <a name="L3289"></a><tt class="py-lineno">3289</tt> <tt class="py-line"> <tt id="link-3433" class="py-name"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-3433', 'data', 'link-971');">data</a></tt><tt class="py-op">)</tt> </tt>
9982 </div><a name="L3290"></a><tt class="py-lineno">3290</tt> <tt class="py-line"> </tt>
9983 <a name="ETreeWriteTestCase.test_write_file_gzipfile_parse"></a><div id="ETreeWriteTestCase.test_write_file_gzipfile_parse-def"><a name="L3291"></a><tt class="py-lineno">3291</tt> <a class="py-toggle" href="#" id="ETreeWriteTestCase.test_write_file_gzipfile_parse-toggle" onclick="return toggle('ETreeWriteTestCase.test_write_file_gzipfile_parse');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeWriteTestCase-class.html#test_write_file_gzipfile_parse">test_write_file_gzipfile_parse</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
9984 </div><div id="ETreeWriteTestCase.test_write_file_gzipfile_parse-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeWriteTestCase.test_write_file_gzipfile_parse-expanded"><a name="L3292"></a><tt class="py-lineno">3292</tt> <tt class="py-line"> <tt class="py-name">tree</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3434" class="py-name"><a title="lxml.cssselect.parse
9985 lxml.etree._ElementTree.parse
9987 lxml.html.ElementSoup.parse
9988 lxml.html.html5parser.parse
9990 lxml.html.soupparser.parse
9991 lxml.objectify.parse
9992 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3434', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt id="link-3435" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3435', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a>'</tt><tt class="py-op">+</tt><tt class="py-string">'<b/>'</tt><tt class="py-op">*</tt><tt class="py-number">200</tt><tt class="py-op">+</tt><tt class="py-string">'</a>'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
9993 <a name="L3293"></a><tt class="py-lineno">3293</tt> <tt class="py-line"> <tt id="link-3436" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker.handle
9994 lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker.handle
9995 lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker.handle
9996 lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker.handle
9997 lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker.handle" class="py-name" href="#" onclick="return doclink('link-3436', 'handle', 'link-3243');">handle</a></tt><tt class="py-op">,</tt> <tt id="link-3437" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3437', 'filename', 'link-3180');">filename</a></tt> <tt class="py-op">=</tt> <tt class="py-name">tempfile</tt><tt class="py-op">.</tt><tt class="py-name">mkstemp</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
9998 <a name="L3294"></a><tt class="py-lineno">3294</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
9999 <a name="L3295"></a><tt class="py-lineno">3295</tt> <tt class="py-line"> <tt class="py-name">tree</tt><tt class="py-op">.</tt><tt id="link-3438" class="py-name"><a title="lxml.etree._ElementTree.write" class="py-name" href="#" onclick="return doclink('link-3438', 'write', 'link-3172');">write</a></tt><tt class="py-op">(</tt><tt id="link-3439" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3439', 'filename', 'link-3180');">filename</a></tt><tt class="py-op">,</tt> <tt class="py-name">compression</tt><tt class="py-op">=</tt><tt class="py-number">9</tt><tt class="py-op">)</tt> </tt>
10000 <a name="L3296"></a><tt class="py-lineno">3296</tt> <tt class="py-line"> <tt id="link-3440" class="py-name"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-3440', 'data', 'link-971');">data</a></tt> <tt class="py-op">=</tt> <tt id="link-3441" class="py-name"><a title="lxml.etree
10001 lxml.sax.ElementTreeContentHandler.etree
10002 lxml.tests.test_elementtree.CElementTreeTestCase.etree
10003 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
10004 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3441', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3442" class="py-name"><a title="lxml.etree.XSLT.tostring
10005 lxml.etree.tostring
10006 lxml.html.tostring" class="py-name" href="#" onclick="return doclink('link-3442', 'tostring', 'link-597');">tostring</a></tt><tt class="py-op">(</tt><tt id="link-3443" class="py-name"><a title="lxml.etree
10007 lxml.sax.ElementTreeContentHandler.etree
10008 lxml.tests.test_elementtree.CElementTreeTestCase.etree
10009 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
10010 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3443', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3444" class="py-name"><a title="lxml.cssselect.parse
10011 lxml.etree._ElementTree.parse
10013 lxml.html.ElementSoup.parse
10014 lxml.html.html5parser.parse
10016 lxml.html.soupparser.parse
10017 lxml.objectify.parse
10018 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3444', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt> </tt>
10019 <a name="L3297"></a><tt class="py-lineno">3297</tt> <tt class="py-line"> <tt class="py-name">gzip</tt><tt class="py-op">.</tt><tt class="py-name">GzipFile</tt><tt class="py-op">(</tt><tt id="link-3445" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3445', 'filename', 'link-3180');">filename</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
10020 <a name="L3298"></a><tt class="py-lineno">3298</tt> <tt class="py-line"> <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
10021 <a name="L3299"></a><tt class="py-lineno">3299</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-3446" class="py-name"><a title="lxml.etree.TreeBuilder.close
10022 lxml.etree._FeedParser.close" class="py-name" href="#" onclick="return doclink('link-3446', 'close', 'link-937');">close</a></tt><tt class="py-op">(</tt><tt id="link-3447" class="py-name"><a title="lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker.handle
10023 lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker.handle
10024 lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker.handle
10025 lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker.handle
10026 lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker.handle" class="py-name" href="#" onclick="return doclink('link-3447', 'handle', 'link-3243');">handle</a></tt><tt class="py-op">)</tt> </tt>
10027 <a name="L3300"></a><tt class="py-lineno">3300</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-3448" class="py-name"><a title="lxml.etree._Element.remove
10028 lxml.etree._ResolverRegistry.remove
10029 lxml.html.CheckboxValues.remove
10030 lxml.html.MultipleSelectOptions.remove" class="py-name" href="#" onclick="return doclink('link-3448', 'remove', 'link-607');">remove</a></tt><tt class="py-op">(</tt><tt id="link-3449" class="py-name"><a title="lxml.etree._LogEntry.filename" class="py-name" href="#" onclick="return doclink('link-3449', 'filename', 'link-3180');">filename</a></tt><tt class="py-op">)</tt> </tt>
10031 <a name="L3301"></a><tt class="py-lineno">3301</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt id="link-3450" class="py-name"><a title="lxml.tests.common_imports._bytes" class="py-name" href="#" onclick="return doclink('link-3450', '_bytes', 'link-21');">_bytes</a></tt><tt class="py-op">(</tt><tt class="py-string">'<a>'</tt><tt class="py-op">+</tt><tt class="py-string">'<b/>'</tt><tt class="py-op">*</tt><tt class="py-number">200</tt><tt class="py-op">+</tt><tt class="py-string">'</a>'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
10032 <a name="L3302"></a><tt class="py-lineno">3302</tt> <tt class="py-line"> <tt id="link-3451" class="py-name"><a title="lxml.etree.TreeBuilder.data" class="py-name" href="#" onclick="return doclink('link-3451', 'data', 'link-971');">data</a></tt><tt class="py-op">)</tt> </tt>
10033 </div></div><a name="L3303"></a><tt class="py-lineno">3303</tt> <tt class="py-line"> </tt>
10034 <a name="ETreeErrorLogTest"></a><div id="ETreeErrorLogTest-def"><a name="L3304"></a><tt class="py-lineno">3304</tt> <a class="py-toggle" href="#" id="ETreeErrorLogTest-toggle" onclick="return toggle('ETreeErrorLogTest');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeErrorLogTest-class.html">ETreeErrorLogTest</a><tt class="py-op">(</tt><tt class="py-base-class">HelperTestCase</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
10035 </div><div id="ETreeErrorLogTest-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="ETreeErrorLogTest-expanded"><a name="L3305"></a><tt class="py-lineno">3305</tt> <tt class="py-line"> <tt id="link-3452" class="py-name"><a title="lxml.etree
10036 lxml.sax.ElementTreeContentHandler.etree
10037 lxml.tests.test_elementtree.CElementTreeTestCase.etree
10038 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
10039 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3452', 'etree', 'link-10');">etree</a></tt> <tt class="py-op">=</tt> <tt id="link-3453" class="py-name"><a title="lxml.etree
10040 lxml.sax.ElementTreeContentHandler.etree
10041 lxml.tests.test_elementtree.CElementTreeTestCase.etree
10042 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
10043 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3453', 'etree', 'link-10');">etree</a></tt> </tt>
10044 <a name="L3306"></a><tt class="py-lineno">3306</tt> <tt class="py-line"> </tt>
10045 <a name="ETreeErrorLogTest.test_parse_error_logging"></a><div id="ETreeErrorLogTest.test_parse_error_logging-def"><a name="L3307"></a><tt class="py-lineno">3307</tt> <a class="py-toggle" href="#" id="ETreeErrorLogTest.test_parse_error_logging-toggle" onclick="return toggle('ETreeErrorLogTest.test_parse_error_logging');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeErrorLogTest-class.html#test_parse_error_logging">test_parse_error_logging</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
10046 </div><div id="ETreeErrorLogTest.test_parse_error_logging-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeErrorLogTest.test_parse_error_logging-expanded"><a name="L3308"></a><tt class="py-lineno">3308</tt> <tt class="py-line"> <tt id="link-3454" class="py-name"><a title="lxml.cssselect.parse
10047 lxml.etree._ElementTree.parse
10049 lxml.html.ElementSoup.parse
10050 lxml.html.html5parser.parse
10052 lxml.html.soupparser.parse
10053 lxml.objectify.parse
10054 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3454', 'parse', 'link-757');">parse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3455" class="py-name"><a title="lxml.etree
10055 lxml.sax.ElementTreeContentHandler.etree
10056 lxml.tests.test_elementtree.CElementTreeTestCase.etree
10057 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
10058 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3455', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3456" class="py-name"><a title="lxml.cssselect.parse
10059 lxml.etree._ElementTree.parse
10061 lxml.html.ElementSoup.parse
10062 lxml.html.html5parser.parse
10064 lxml.html.soupparser.parse
10065 lxml.objectify.parse
10066 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3456', 'parse', 'link-757');">parse</a></tt> </tt>
10067 <a name="L3309"></a><tt class="py-lineno">3309</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-string">'<a><b></c></b></a>'</tt><tt class="py-op">)</tt> </tt>
10068 <a name="L3310"></a><tt class="py-lineno">3310</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3457" class="py-name"><a title="lxml.etree
10069 lxml.sax.ElementTreeContentHandler.etree
10070 lxml.tests.test_elementtree.CElementTreeTestCase.etree
10071 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
10072 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3457', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3458" class="py-name" targets="Function lxml.etree.clear_error_log()=lxml.etree-module.html#clear_error_log"><a title="lxml.etree.clear_error_log" class="py-name" href="#" onclick="return doclink('link-3458', 'clear_error_log', 'link-3458');">clear_error_log</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
10073 <a name="L3311"></a><tt class="py-lineno">3311</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
10074 <a name="L3312"></a><tt class="py-lineno">3312</tt> <tt class="py-line"> <tt id="link-3459" class="py-name"><a title="lxml.cssselect.parse
10075 lxml.etree._ElementTree.parse
10077 lxml.html.ElementSoup.parse
10078 lxml.html.html5parser.parse
10080 lxml.html.soupparser.parse
10081 lxml.objectify.parse
10082 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3459', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
10083 <a name="L3313"></a><tt class="py-lineno">3313</tt> <tt class="py-line"> <tt class="py-name">logs</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
10084 <a name="L3314"></a><tt class="py-lineno">3314</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">:</tt> </tt>
10085 <a name="L3315"></a><tt class="py-lineno">3315</tt> <tt class="py-line"> <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">exc_info</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
10086 <a name="L3316"></a><tt class="py-lineno">3316</tt> <tt class="py-line"> <tt class="py-name">logs</tt> <tt class="py-op">=</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-3460" class="py-name" targets="Variable lxml.etree.XInclude.error_log=lxml.etree.XInclude-class.html#error_log,Variable lxml.etree.XSLT.error_log=lxml.etree.XSLT-class.html#error_log,Variable lxml.etree._BaseParser.error_log=lxml.etree._BaseParser-class.html#error_log,Variable lxml.etree._Validator.error_log=lxml.etree._Validator-class.html#error_log,Variable lxml.etree._XPathEvaluatorBase.error_log=lxml.etree._XPathEvaluatorBase-class.html#error_log,Variable lxml.etree.iterparse.error_log=lxml.etree.iterparse-class.html#error_log"><a title="lxml.etree.XInclude.error_log
10087 lxml.etree.XSLT.error_log
10088 lxml.etree._BaseParser.error_log
10089 lxml.etree._Validator.error_log
10090 lxml.etree._XPathEvaluatorBase.error_log
10091 lxml.etree.iterparse.error_log" class="py-name" href="#" onclick="return doclink('link-3460', 'error_log', 'link-3460');">error_log</a></tt> </tt>
10092 <a name="L3317"></a><tt class="py-lineno">3317</tt> <tt class="py-line"> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt id="link-3461" class="py-name"><a title="lxml.etree.TreeBuilder.close
10093 lxml.etree._FeedParser.close" class="py-name" href="#" onclick="return doclink('link-3461', 'close', 'link-937');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
10094 <a name="L3318"></a><tt class="py-lineno">3318</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3462" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-3462', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt> <tt id="link-3463" class="py-name" targets="Method lxml.etree.PyErrorLog.log()=lxml.etree.PyErrorLog-class.html#log"><a title="lxml.etree.PyErrorLog.log" class="py-name" href="#" onclick="return doclink('link-3463', 'log', 'link-3463');">log</a></tt> <tt class="py-keyword">for</tt> <tt id="link-3464" class="py-name"><a title="lxml.etree.PyErrorLog.log" class="py-name" href="#" onclick="return doclink('link-3464', 'log', 'link-3463');">log</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">logs</tt> </tt>
10095 <a name="L3319"></a><tt class="py-lineno">3319</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-string">'mismatch'</tt> <tt class="py-keyword">in</tt> <tt id="link-3465" class="py-name"><a title="lxml.etree.PyErrorLog.log" class="py-name" href="#" onclick="return doclink('link-3465', 'log', 'link-3463');">log</a></tt><tt class="py-op">.</tt><tt id="link-3466" class="py-name" targets="Variable lxml.etree._LogEntry.message=lxml.etree._LogEntry-class.html#message"><a title="lxml.etree._LogEntry.message" class="py-name" href="#" onclick="return doclink('link-3466', 'message', 'link-3466');">message</a></tt> <tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
10096 <a name="L3320"></a><tt class="py-lineno">3320</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3467" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-3467', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt> <tt id="link-3468" class="py-name"><a title="lxml.etree.PyErrorLog.log" class="py-name" href="#" onclick="return doclink('link-3468', 'log', 'link-3463');">log</a></tt> <tt class="py-keyword">for</tt> <tt id="link-3469" class="py-name"><a title="lxml.etree.PyErrorLog.log" class="py-name" href="#" onclick="return doclink('link-3469', 'log', 'link-3463');">log</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">logs</tt> </tt>
10097 <a name="L3321"></a><tt class="py-lineno">3321</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-string">'PARSER'</tt> <tt class="py-keyword">in</tt> <tt id="link-3470" class="py-name"><a title="lxml.etree.PyErrorLog.log" class="py-name" href="#" onclick="return doclink('link-3470', 'log', 'link-3463');">log</a></tt><tt class="py-op">.</tt><tt id="link-3471" class="py-name" targets="Variable lxml.etree._LogEntry.domain_name=lxml.etree._LogEntry-class.html#domain_name"><a title="lxml.etree._LogEntry.domain_name" class="py-name" href="#" onclick="return doclink('link-3471', 'domain_name', 'link-3471');">domain_name</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
10098 <a name="L3322"></a><tt class="py-lineno">3322</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3472" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-3472', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt> <tt id="link-3473" class="py-name"><a title="lxml.etree.PyErrorLog.log" class="py-name" href="#" onclick="return doclink('link-3473', 'log', 'link-3463');">log</a></tt> <tt class="py-keyword">for</tt> <tt id="link-3474" class="py-name"><a title="lxml.etree.PyErrorLog.log" class="py-name" href="#" onclick="return doclink('link-3474', 'log', 'link-3463');">log</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">logs</tt> </tt>
10099 <a name="L3323"></a><tt class="py-lineno">3323</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-string">'ERR_TAG_NAME_MISMATCH'</tt> <tt class="py-keyword">in</tt> <tt id="link-3475" class="py-name"><a title="lxml.etree.PyErrorLog.log" class="py-name" href="#" onclick="return doclink('link-3475', 'log', 'link-3463');">log</a></tt><tt class="py-op">.</tt><tt id="link-3476" class="py-name" targets="Variable lxml.etree._LogEntry.type_name=lxml.etree._LogEntry-class.html#type_name"><a title="lxml.etree._LogEntry.type_name" class="py-name" href="#" onclick="return doclink('link-3476', 'type_name', 'link-3476');">type_name</a></tt> <tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
10100 <a name="L3324"></a><tt class="py-lineno">3324</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3477" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-3477', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt> <tt id="link-3478" class="py-name"><a title="lxml.etree.PyErrorLog.log" class="py-name" href="#" onclick="return doclink('link-3478', 'log', 'link-3463');">log</a></tt> <tt class="py-keyword">for</tt> <tt id="link-3479" class="py-name"><a title="lxml.etree.PyErrorLog.log" class="py-name" href="#" onclick="return doclink('link-3479', 'log', 'link-3463');">log</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">logs</tt> </tt>
10101 <a name="L3325"></a><tt class="py-lineno">3325</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-number">1</tt> <tt class="py-op">==</tt> <tt id="link-3480" class="py-name"><a title="lxml.etree.PyErrorLog.log" class="py-name" href="#" onclick="return doclink('link-3480', 'log', 'link-3463');">log</a></tt><tt class="py-op">.</tt><tt id="link-3481" class="py-name" targets="Variable lxml.etree._LogEntry.line=lxml.etree._LogEntry-class.html#line"><a title="lxml.etree._LogEntry.line" class="py-name" href="#" onclick="return doclink('link-3481', 'line', 'link-3481');">line</a></tt> <tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
10102 <a name="L3326"></a><tt class="py-lineno">3326</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3482" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-3482', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt> <tt id="link-3483" class="py-name"><a title="lxml.etree.PyErrorLog.log" class="py-name" href="#" onclick="return doclink('link-3483', 'log', 'link-3463');">log</a></tt> <tt class="py-keyword">for</tt> <tt id="link-3484" class="py-name"><a title="lxml.etree.PyErrorLog.log" class="py-name" href="#" onclick="return doclink('link-3484', 'log', 'link-3463');">log</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">logs</tt> </tt>
10103 <a name="L3327"></a><tt class="py-lineno">3327</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-number">15</tt> <tt class="py-op">==</tt> <tt id="link-3485" class="py-name"><a title="lxml.etree.PyErrorLog.log" class="py-name" href="#" onclick="return doclink('link-3485', 'log', 'link-3463');">log</a></tt><tt class="py-op">.</tt><tt id="link-3486" class="py-name" targets="Variable lxml.etree._LogEntry.column=lxml.etree._LogEntry-class.html#column"><a title="lxml.etree._LogEntry.column" class="py-name" href="#" onclick="return doclink('link-3486', 'column', 'link-3486');">column</a></tt> <tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
10104 </div><a name="L3328"></a><tt class="py-lineno">3328</tt> <tt class="py-line"> </tt>
10105 <a name="ETreeErrorLogTest._test_python_error_logging"></a><div id="ETreeErrorLogTest._test_python_error_logging-def"><a name="L3329"></a><tt class="py-lineno">3329</tt> <a class="py-toggle" href="#" id="ETreeErrorLogTest._test_python_error_logging-toggle" onclick="return toggle('ETreeErrorLogTest._test_python_error_logging');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree.ETreeErrorLogTest-class.html#_test_python_error_logging">_test_python_error_logging</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
10106 </div><div id="ETreeErrorLogTest._test_python_error_logging-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ETreeErrorLogTest._test_python_error_logging-expanded"><a name="L3330"></a><tt class="py-lineno">3330</tt> <tt class="py-line"> <tt class="py-docstring">"""This can't really be tested as long as there isn't a way to</tt> </tt>
10107 <a name="L3331"></a><tt class="py-lineno">3331</tt> <tt class="py-line"><tt class="py-docstring"> reset the logging setup ...</tt> </tt>
10108 <a name="L3332"></a><tt class="py-lineno">3332</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
10109 <a name="L3333"></a><tt class="py-lineno">3333</tt> <tt class="py-line"> <tt id="link-3487" class="py-name"><a title="lxml.cssselect.parse
10110 lxml.etree._ElementTree.parse
10112 lxml.html.ElementSoup.parse
10113 lxml.html.html5parser.parse
10115 lxml.html.soupparser.parse
10116 lxml.objectify.parse
10117 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3487', 'parse', 'link-757');">parse</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3488" class="py-name"><a title="lxml.etree
10118 lxml.sax.ElementTreeContentHandler.etree
10119 lxml.tests.test_elementtree.CElementTreeTestCase.etree
10120 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
10121 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3488', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3489" class="py-name"><a title="lxml.cssselect.parse
10122 lxml.etree._ElementTree.parse
10124 lxml.html.ElementSoup.parse
10125 lxml.html.html5parser.parse
10127 lxml.html.soupparser.parse
10128 lxml.objectify.parse
10129 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3489', 'parse', 'link-757');">parse</a></tt> </tt>
10130 <a name="L3334"></a><tt class="py-lineno">3334</tt> <tt class="py-line"> </tt>
10131 <a name="L3335"></a><tt class="py-lineno">3335</tt> <tt class="py-line"> <tt class="py-name">messages</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
10132 <a name="L3336"></a><tt class="py-lineno">3336</tt> <tt class="py-line"> <tt class="py-keyword">class</tt> <tt class="py-def-name">Logger</tt><tt class="py-op">(</tt><tt class="py-base-class">self</tt><tt class="py-op">.</tt><tt class="py-base-class">etree</tt><tt class="py-op">.</tt><tt class="py-base-class">PyErrorLog</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
10133 <a name="L3337"></a><tt class="py-lineno">3337</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">log</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">entry</tt><tt class="py-op">,</tt> <tt class="py-param">message</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
10134 <a name="L3338"></a><tt class="py-lineno">3338</tt> <tt class="py-line"> <tt class="py-name">messages</tt><tt class="py-op">.</tt><tt id="link-3490" class="py-name"><a title="lxml.etree._AppendOnlyElementProxy.append
10135 lxml.etree._Element.append
10136 lxml.etree._OpaqueDocumentWrapper.append
10137 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-3490', 'append', 'link-621');">append</a></tt><tt class="py-op">(</tt><tt id="link-3491" class="py-name"><a title="lxml.etree._LogEntry.message" class="py-name" href="#" onclick="return doclink('link-3491', 'message', 'link-3466');">message</a></tt><tt class="py-op">)</tt> </tt>
10138 </div></div><a name="L3339"></a><tt class="py-lineno">3339</tt> <tt class="py-line"> </tt>
10139 <a name="L3340"></a><tt class="py-lineno">3340</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3492" class="py-name"><a title="lxml.etree
10140 lxml.sax.ElementTreeContentHandler.etree
10141 lxml.tests.test_elementtree.CElementTreeTestCase.etree
10142 lxml.tests.test_elementtree.ETreeTestCaseBase.etree
10143 lxml.tests.test_io.IOTestCaseBase.etree" class="py-name" href="#" onclick="return doclink('link-3492', 'etree', 'link-10');">etree</a></tt><tt class="py-op">.</tt><tt id="link-3493" class="py-name" targets="Function lxml.etree.use_global_python_log()=lxml.etree-module.html#use_global_python_log"><a title="lxml.etree.use_global_python_log" class="py-name" href="#" onclick="return doclink('link-3493', 'use_global_python_log', 'link-3493');">use_global_python_log</a></tt><tt class="py-op">(</tt><tt class="py-name">Logger</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
10144 <a name="L3341"></a><tt class="py-lineno">3341</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">BytesIO</tt><tt class="py-op">(</tt><tt class="py-string">'<a><b></c></b></a>'</tt><tt class="py-op">)</tt> </tt>
10145 <a name="L3342"></a><tt class="py-lineno">3342</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
10146 <a name="L3343"></a><tt class="py-lineno">3343</tt> <tt class="py-line"> <tt id="link-3494" class="py-name"><a title="lxml.cssselect.parse
10147 lxml.etree._ElementTree.parse
10149 lxml.html.ElementSoup.parse
10150 lxml.html.html5parser.parse
10152 lxml.html.soupparser.parse
10153 lxml.objectify.parse
10154 lxml.tests.common_imports.HelperTestCase.parse" class="py-name" href="#" onclick="return doclink('link-3494', 'parse', 'link-757');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
10155 <a name="L3344"></a><tt class="py-lineno">3344</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">SyntaxError</tt><tt class="py-op">:</tt> </tt>
10156 <a name="L3345"></a><tt class="py-lineno">3345</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
10157 <a name="L3346"></a><tt class="py-lineno">3346</tt> <tt class="py-line"> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt id="link-3495" class="py-name"><a title="lxml.etree.TreeBuilder.close
10158 lxml.etree._FeedParser.close" class="py-name" href="#" onclick="return doclink('link-3495', 'close', 'link-937');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
10159 <a name="L3347"></a><tt class="py-lineno">3347</tt> <tt class="py-line"> </tt>
10160 <a name="L3348"></a><tt class="py-lineno">3348</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3496" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-3496', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt> <tt id="link-3497" class="py-name"><a title="lxml.etree._LogEntry.message" class="py-name" href="#" onclick="return doclink('link-3497', 'message', 'link-3466');">message</a></tt> <tt class="py-keyword">for</tt> <tt id="link-3498" class="py-name"><a title="lxml.etree._LogEntry.message" class="py-name" href="#" onclick="return doclink('link-3498', 'message', 'link-3466');">message</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">messages</tt> </tt>
10161 <a name="L3349"></a><tt class="py-lineno">3349</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-string">'mismatch'</tt> <tt class="py-keyword">in</tt> <tt id="link-3499" class="py-name"><a title="lxml.etree._LogEntry.message" class="py-name" href="#" onclick="return doclink('link-3499', 'message', 'link-3466');">message</a></tt> <tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
10162 <a name="L3350"></a><tt class="py-lineno">3350</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3500" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-3500', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt> <tt id="link-3501" class="py-name"><a title="lxml.etree._LogEntry.message" class="py-name" href="#" onclick="return doclink('link-3501', 'message', 'link-3466');">message</a></tt> <tt class="py-keyword">for</tt> <tt id="link-3502" class="py-name"><a title="lxml.etree._LogEntry.message" class="py-name" href="#" onclick="return doclink('link-3502', 'message', 'link-3466');">message</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">messages</tt> </tt>
10163 <a name="L3351"></a><tt class="py-lineno">3351</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-string">':PARSER:'</tt> <tt class="py-keyword">in</tt> <tt id="link-3503" class="py-name"><a title="lxml.etree._LogEntry.message" class="py-name" href="#" onclick="return doclink('link-3503', 'message', 'link-3466');">message</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
10164 <a name="L3352"></a><tt class="py-lineno">3352</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3504" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-3504', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt> <tt id="link-3505" class="py-name"><a title="lxml.etree._LogEntry.message" class="py-name" href="#" onclick="return doclink('link-3505', 'message', 'link-3466');">message</a></tt> <tt class="py-keyword">for</tt> <tt id="link-3506" class="py-name"><a title="lxml.etree._LogEntry.message" class="py-name" href="#" onclick="return doclink('link-3506', 'message', 'link-3466');">message</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">messages</tt> </tt>
10165 <a name="L3353"></a><tt class="py-lineno">3353</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-string">':ERR_TAG_NAME_MISMATCH:'</tt> <tt class="py-keyword">in</tt> <tt id="link-3507" class="py-name"><a title="lxml.etree._LogEntry.message" class="py-name" href="#" onclick="return doclink('link-3507', 'message', 'link-3466');">message</a></tt> <tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
10166 <a name="L3354"></a><tt class="py-lineno">3354</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3508" class="py-name"><a title="lxml.etree._Validator.assert_" class="py-name" href="#" onclick="return doclink('link-3508', 'assert_', 'link-35');">assert_</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt> <tt id="link-3509" class="py-name"><a title="lxml.etree._LogEntry.message" class="py-name" href="#" onclick="return doclink('link-3509', 'message', 'link-3466');">message</a></tt> <tt class="py-keyword">for</tt> <tt id="link-3510" class="py-name"><a title="lxml.etree._LogEntry.message" class="py-name" href="#" onclick="return doclink('link-3510', 'message', 'link-3466');">message</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">messages</tt> </tt>
10167 <a name="L3355"></a><tt class="py-lineno">3355</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-string">':1:15:'</tt> <tt class="py-keyword">in</tt> <tt id="link-3511" class="py-name"><a title="lxml.etree._LogEntry.message" class="py-name" href="#" onclick="return doclink('link-3511', 'message', 'link-3466');">message</a></tt> <tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
10168 </div></div><a name="L3356"></a><tt class="py-lineno">3356</tt> <tt class="py-line"> </tt>
10169 <a name="test_suite"></a><div id="test_suite-def"><a name="L3357"></a><tt class="py-lineno">3357</tt> <a class="py-toggle" href="#" id="test_suite-toggle" onclick="return toggle('test_suite');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml.tests.test_etree-module.html#test_suite">test_suite</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
10170 </div><div id="test_suite-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="test_suite-expanded"><a name="L3358"></a><tt class="py-lineno">3358</tt> <tt class="py-line"> <tt class="py-name">suite</tt> <tt class="py-op">=</tt> <tt class="py-name">unittest</tt><tt class="py-op">.</tt><tt class="py-name">TestSuite</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
10171 <a name="L3359"></a><tt class="py-lineno">3359</tt> <tt class="py-line"> <tt class="py-name">suite</tt><tt class="py-op">.</tt><tt class="py-name">addTests</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">unittest</tt><tt class="py-op">.</tt><tt class="py-name">makeSuite</tt><tt class="py-op">(</tt><tt id="link-3512" class="py-name" targets="Class lxml.tests.test_etree.ETreeOnlyTestCase=lxml.tests.test_etree.ETreeOnlyTestCase-class.html"><a title="lxml.tests.test_etree.ETreeOnlyTestCase" class="py-name" href="#" onclick="return doclink('link-3512', 'ETreeOnlyTestCase', 'link-3512');">ETreeOnlyTestCase</a></tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
10172 <a name="L3360"></a><tt class="py-lineno">3360</tt> <tt class="py-line"> <tt class="py-name">suite</tt><tt class="py-op">.</tt><tt class="py-name">addTests</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">unittest</tt><tt class="py-op">.</tt><tt class="py-name">makeSuite</tt><tt class="py-op">(</tt><tt id="link-3513" class="py-name" targets="Class lxml.tests.test_etree.ETreeXIncludeTestCase=lxml.tests.test_etree.ETreeXIncludeTestCase-class.html"><a title="lxml.tests.test_etree.ETreeXIncludeTestCase" class="py-name" href="#" onclick="return doclink('link-3513', 'ETreeXIncludeTestCase', 'link-3513');">ETreeXIncludeTestCase</a></tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
10173 <a name="L3361"></a><tt class="py-lineno">3361</tt> <tt class="py-line"> <tt class="py-name">suite</tt><tt class="py-op">.</tt><tt class="py-name">addTests</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">unittest</tt><tt class="py-op">.</tt><tt class="py-name">makeSuite</tt><tt class="py-op">(</tt><tt id="link-3514" class="py-name" targets="Class lxml.tests.test_etree.ElementIncludeTestCase=lxml.tests.test_etree.ElementIncludeTestCase-class.html"><a title="lxml.tests.test_etree.ElementIncludeTestCase" class="py-name" href="#" onclick="return doclink('link-3514', 'ElementIncludeTestCase', 'link-3514');">ElementIncludeTestCase</a></tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
10174 <a name="L3362"></a><tt class="py-lineno">3362</tt> <tt class="py-line"> <tt class="py-name">suite</tt><tt class="py-op">.</tt><tt class="py-name">addTests</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">unittest</tt><tt class="py-op">.</tt><tt class="py-name">makeSuite</tt><tt class="py-op">(</tt><tt id="link-3515" class="py-name" targets="Class lxml.tests.test_etree.ETreeC14NTestCase=lxml.tests.test_etree.ETreeC14NTestCase-class.html"><a title="lxml.tests.test_etree.ETreeC14NTestCase" class="py-name" href="#" onclick="return doclink('link-3515', 'ETreeC14NTestCase', 'link-3515');">ETreeC14NTestCase</a></tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
10175 <a name="L3363"></a><tt class="py-lineno">3363</tt> <tt class="py-line"> <tt class="py-name">suite</tt><tt class="py-op">.</tt><tt class="py-name">addTests</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">unittest</tt><tt class="py-op">.</tt><tt class="py-name">makeSuite</tt><tt class="py-op">(</tt><tt id="link-3516" class="py-name" targets="Class lxml.tests.test_etree.ETreeWriteTestCase=lxml.tests.test_etree.ETreeWriteTestCase-class.html"><a title="lxml.tests.test_etree.ETreeWriteTestCase" class="py-name" href="#" onclick="return doclink('link-3516', 'ETreeWriteTestCase', 'link-3516');">ETreeWriteTestCase</a></tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
10176 <a name="L3364"></a><tt class="py-lineno">3364</tt> <tt class="py-line"> <tt class="py-name">suite</tt><tt class="py-op">.</tt><tt class="py-name">addTests</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">unittest</tt><tt class="py-op">.</tt><tt class="py-name">makeSuite</tt><tt class="py-op">(</tt><tt id="link-3517" class="py-name" targets="Class lxml.tests.test_etree.ETreeErrorLogTest=lxml.tests.test_etree.ETreeErrorLogTest-class.html"><a title="lxml.tests.test_etree.ETreeErrorLogTest" class="py-name" href="#" onclick="return doclink('link-3517', 'ETreeErrorLogTest', 'link-3517');">ETreeErrorLogTest</a></tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
10177 <a name="L3365"></a><tt class="py-lineno">3365</tt> <tt class="py-line"> <tt class="py-name">suite</tt><tt class="py-op">.</tt><tt class="py-name">addTests</tt><tt class="py-op">(</tt> </tt>
10178 <a name="L3366"></a><tt class="py-lineno">3366</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt id="link-3518" class="py-name"><a title="lxml.tests.common_imports.make_doctest" class="py-name" href="#" onclick="return doclink('link-3518', 'make_doctest', 'link-17');">make_doctest</a></tt><tt class="py-op">(</tt><tt class="py-string">'../../../doc/tutorial.txt'</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
10179 <a name="L3367"></a><tt class="py-lineno">3367</tt> <tt class="py-line"> <tt class="py-name">suite</tt><tt class="py-op">.</tt><tt class="py-name">addTests</tt><tt class="py-op">(</tt> </tt>
10180 <a name="L3368"></a><tt class="py-lineno">3368</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt id="link-3519" class="py-name"><a title="lxml.tests.common_imports.make_doctest" class="py-name" href="#" onclick="return doclink('link-3519', 'make_doctest', 'link-17');">make_doctest</a></tt><tt class="py-op">(</tt><tt class="py-string">'../../../doc/api.txt'</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
10181 <a name="L3369"></a><tt class="py-lineno">3369</tt> <tt class="py-line"> <tt class="py-name">suite</tt><tt class="py-op">.</tt><tt class="py-name">addTests</tt><tt class="py-op">(</tt> </tt>
10182 <a name="L3370"></a><tt class="py-lineno">3370</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt id="link-3520" class="py-name"><a title="lxml.tests.common_imports.make_doctest" class="py-name" href="#" onclick="return doclink('link-3520', 'make_doctest', 'link-17');">make_doctest</a></tt><tt class="py-op">(</tt><tt class="py-string">'../../../doc/FAQ.txt'</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
10183 <a name="L3371"></a><tt class="py-lineno">3371</tt> <tt class="py-line"> <tt class="py-name">suite</tt><tt class="py-op">.</tt><tt class="py-name">addTests</tt><tt class="py-op">(</tt> </tt>
10184 <a name="L3372"></a><tt class="py-lineno">3372</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt id="link-3521" class="py-name"><a title="lxml.tests.common_imports.make_doctest" class="py-name" href="#" onclick="return doclink('link-3521', 'make_doctest', 'link-17');">make_doctest</a></tt><tt class="py-op">(</tt><tt class="py-string">'../../../doc/parsing.txt'</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
10185 <a name="L3373"></a><tt class="py-lineno">3373</tt> <tt class="py-line"> <tt class="py-name">suite</tt><tt class="py-op">.</tt><tt class="py-name">addTests</tt><tt class="py-op">(</tt> </tt>
10186 <a name="L3374"></a><tt class="py-lineno">3374</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt id="link-3522" class="py-name"><a title="lxml.tests.common_imports.make_doctest" class="py-name" href="#" onclick="return doclink('link-3522', 'make_doctest', 'link-17');">make_doctest</a></tt><tt class="py-op">(</tt><tt class="py-string">'../../../doc/resolvers.txt'</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
10187 <a name="L3375"></a><tt class="py-lineno">3375</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">suite</tt> </tt>
10188 </div><a name="L3376"></a><tt class="py-lineno">3376</tt> <tt class="py-line"> </tt>
10189 <a name="L3377"></a><tt class="py-lineno">3377</tt> <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
10190 <a name="L3378"></a><tt class="py-lineno">3378</tt> <tt class="py-line"> <tt class="py-keyword">print</tt><tt class="py-op">(</tt><tt class="py-string">'to test use test.py %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">__file__</tt><tt class="py-op">)</tt> </tt>
10191 <a name="L3379"></a><tt class="py-lineno">3379</tt> <tt class="py-line"> </tt><script type="text/javascript">
10193 expandto(location.href);
10198 <!-- ==================== NAVIGATION BAR ==================== -->
10199 <table class="navbar" border="0" width="100%" cellpadding="0"
10200 bgcolor="#a0c0ff" cellspacing="0">
10201 <tr valign="middle">
10203 <th> <a
10204 href="lxml-module.html">Home</a> </th>
10207 <th> <a
10208 href="module-tree.html">Trees</a> </th>
10210 <!-- Index link -->
10211 <th> <a
10212 href="identifier-index.html">Indices</a> </th>
10215 <th> <a
10216 href="help.html">Help</a> </th>
10218 <!-- Project homepage -->
10219 <th class="navbar" align="right" width="100%">
10220 <table border="0" cellpadding="0" cellspacing="0">
10221 <tr><th class="navbar" align="center"
10222 ><a class="navbar" target="_top" href="/">lxml API</a></th>
10226 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
10228 <td align="left" class="footer">
10229 Generated by Epydoc 3.0.1 on Tue Jul 31 10:14:21 2012
10231 <td align="right" class="footer">
10232 <a target="mainFrame" href="http://epydoc.sourceforge.net"
10233 >http://epydoc.sourceforge.net</a>
10238 <script type="text/javascript">
10240 // Private objects are initially displayed (because if
10241 // javascript is turned off then we want them to be
10242 // visible); but by default, we want to hide them. So hide
10243 // them unless we have a cookie that says to show them.