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.etree.PIBase</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.etree-module.html">Module etree</a> ::
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.etree.PIBase-class.html"
58 target="_top">no frames</a>]</span></td></tr>
63 <!-- ==================== CLASS DESCRIPTION ==================== -->
64 <h1 class="epydoc">Class PIBase</h1><p class="nomargin-top"></p>
65 <pre class="base-tree">
68 <a href="lxml.etree._Element-class.html" onclick="show_private();">_Element</a> --+
70 ??.__ContentOnlyElement --+
72 <a href="lxml.etree._ProcessingInstruction-class.html" onclick="show_private();">_ProcessingInstruction</a> --+
74 <strong class="uidshort">PIBase</strong>
77 <dl><dt>Known Subclasses:</dt>
79 <ul class="subclass-list">
80 <li><a href="lxml.html.HtmlProcessingInstruction-class.html">html.HtmlProcessingInstruction</a></li><li class="private">, <a href="lxml.etree._XSLTProcessingInstruction-class.html" onclick="show_private();">_XSLTProcessingInstruction</a></li> </ul>
84 <p>All custom Processing Instruction classes must inherit from this one.</p>
85 <p>To create an XML ProcessingInstruction instance, use the <tt class="rst-docutils literal">PI()</tt>
87 <p>Subclasses <em>must not</em> override __init__ or __new__ as it is
88 absolutely undefined when these objects will be created or
89 destroyed. All persistent state of PIs must be stored in the
90 underlying XML. If you really need to initialize the object after
91 creation, you can implement an <tt class="rst-docutils literal">_init(self)</tt> method that will be
92 called after object creation.</p>
94 <!-- ==================== INSTANCE METHODS ==================== -->
95 <a name="section-InstanceMethods"></a>
96 <table class="summary" border="1" cellpadding="3"
97 cellspacing="0" width="100%" bgcolor="white">
98 <tr bgcolor="#70b0f0" class="table-header">
99 <td colspan="2" class="table-header">
100 <table border="0" cellpadding="0" cellspacing="0" width="100%">
102 <td align="left"><span class="table-header">Instance Methods</span></td>
103 <td align="right" valign="top"
104 ><span class="options">[<a href="#section-InstanceMethods"
105 class="privatelink" onclick="toggle_private();"
106 >hide private</a>]</span></td>
112 <td width="15%" align="right" valign="top" class="summary">
113 <span class="summary-type"> </span>
114 </td><td class="summary">
115 <table width="100%" cellpadding="0" cellspacing="0" border="0">
117 <td><span class="summary-sig"><a href="lxml.etree.PIBase-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">...</span>)</span><br />
118 x.__init__(...) initializes x; see help(type(x)) for signature</td>
119 <td align="right" valign="top">
129 <td width="15%" align="right" valign="top" class="summary">
130 <span class="summary-type">a new object with type S, a subtype of T</span>
131 </td><td class="summary">
132 <table width="100%" cellpadding="0" cellspacing="0" border="0">
134 <td><span class="summary-sig"><a href="lxml.etree.PIBase-class.html#__new__" class="summary-sig-name">__new__</a>(<span class="summary-sig-arg">T</span>,
135 <span class="summary-sig-arg">S</span>,
136 <span class="summary-sig-arg">...</span>)</span></td>
137 <td align="right" valign="top">
147 <td colspan="2" class="summary">
148 <p class="indent-wrapped-lines"><b>Inherited from <code><a href="lxml.etree._ProcessingInstruction-class.html" onclick="show_private();">_ProcessingInstruction</a></code></b>:
149 <code><a href="lxml.etree._ProcessingInstruction-class.html#__repr__">__repr__</a></code>,
150 <code><a href="lxml.etree._ProcessingInstruction-class.html#get">get</a></code>
152 <p class="indent-wrapped-lines"><b>Inherited from <code><i>unreachable</i>.__ContentOnlyElement</code></b>:
153 <code>__delitem__</code>,
154 <code>__getitem__</code>,
155 <code>__len__</code>,
156 <code>__setitem__</code>,
164 <p class="indent-wrapped-lines"><b>Inherited from <code><a href="lxml.etree._Element-class.html" onclick="show_private();">_Element</a></code></b>:
165 <code><a href="lxml.etree._Element-class.html#__contains__">__contains__</a></code>,
166 <code><a href="lxml.etree._Element-class.html#__copy__">__copy__</a></code>,
167 <code><a href="lxml.etree._Element-class.html#__deepcopy__">__deepcopy__</a></code>,
168 <code><a href="lxml.etree._Element-class.html#__iter__">__iter__</a></code>,
169 <code><a href="lxml.etree._Element-class.html#__nonzero__">__nonzero__</a></code>,
170 <code><a href="lxml.etree._Element-class.html#__reversed__">__reversed__</a></code>,
171 <code><a href="lxml.etree._Element-class.html#addnext">addnext</a></code>,
172 <code><a href="lxml.etree._Element-class.html#addprevious">addprevious</a></code>,
173 <code><a href="lxml.etree._Element-class.html#clear">clear</a></code>,
174 <code><a href="lxml.etree._Element-class.html#cssselect">cssselect</a></code>,
175 <code><a href="lxml.etree._Element-class.html#extend">extend</a></code>,
176 <code><a href="lxml.etree._Element-class.html#find">find</a></code>,
177 <code><a href="lxml.etree._Element-class.html#findall">findall</a></code>,
178 <code><a href="lxml.etree._Element-class.html#findtext">findtext</a></code>,
179 <code><a href="lxml.etree._Element-class.html#getchildren">getchildren</a></code>,
180 <code><a href="lxml.etree._Element-class.html#getiterator">getiterator</a></code>,
181 <code><a href="lxml.etree._Element-class.html#getnext">getnext</a></code>,
182 <code><a href="lxml.etree._Element-class.html#getparent">getparent</a></code>,
183 <code><a href="lxml.etree._Element-class.html#getprevious">getprevious</a></code>,
184 <code><a href="lxml.etree._Element-class.html#getroottree">getroottree</a></code>,
185 <code><a href="lxml.etree._Element-class.html#index">index</a></code>,
186 <code><a href="lxml.etree._Element-class.html#iter">iter</a></code>,
187 <code><a href="lxml.etree._Element-class.html#iterancestors">iterancestors</a></code>,
188 <code><a href="lxml.etree._Element-class.html#iterchildren">iterchildren</a></code>,
189 <code><a href="lxml.etree._Element-class.html#iterdescendants">iterdescendants</a></code>,
190 <code><a href="lxml.etree._Element-class.html#iterfind">iterfind</a></code>,
191 <code><a href="lxml.etree._Element-class.html#itersiblings">itersiblings</a></code>,
192 <code><a href="lxml.etree._Element-class.html#itertext">itertext</a></code>,
193 <code><a href="lxml.etree._Element-class.html#makeelement">makeelement</a></code>,
194 <code><a href="lxml.etree._Element-class.html#remove">remove</a></code>,
195 <code><a href="lxml.etree._Element-class.html#replace">replace</a></code>,
196 <code><a href="lxml.etree._Element-class.html#xpath">xpath</a></code>
198 <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="lxml.etree._Element-class.html" onclick="show_private();">_Element</a></code></b> (private):
199 <code><a href="lxml.etree._Element-class.html#_init" onclick="show_private();">_init</a></code>
201 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
202 <code>__delattr__</code>,
203 <code>__format__</code>,
204 <code>__getattribute__</code>,
205 <code>__hash__</code>,
206 <code>__reduce__</code>,
207 <code>__reduce_ex__</code>,
208 <code>__setattr__</code>,
209 <code>__sizeof__</code>,
210 <code>__str__</code>,
211 <code>__subclasshook__</code>
216 <!-- ==================== PROPERTIES ==================== -->
217 <a name="section-Properties"></a>
218 <table class="summary" border="1" cellpadding="3"
219 cellspacing="0" width="100%" bgcolor="white">
220 <tr bgcolor="#70b0f0" class="table-header">
221 <td colspan="2" class="table-header">
222 <table border="0" cellpadding="0" cellspacing="0" width="100%">
224 <td align="left"><span class="table-header">Properties</span></td>
225 <td align="right" valign="top"
226 ><span class="options">[<a href="#section-Properties"
227 class="privatelink" onclick="toggle_private();"
228 >hide private</a>]</span></td>
234 <td colspan="2" class="summary">
235 <p class="indent-wrapped-lines"><b>Inherited from <code><a href="lxml.etree._ProcessingInstruction-class.html" onclick="show_private();">_ProcessingInstruction</a></code></b>:
236 <code><a href="lxml.etree._ProcessingInstruction-class.html#attrib">attrib</a></code>,
237 <code><a href="lxml.etree._ProcessingInstruction-class.html#tag">tag</a></code>,
238 <code><a href="lxml.etree._ProcessingInstruction-class.html#target">target</a></code>
240 <p class="indent-wrapped-lines"><b>Inherited from <code><i>unreachable</i>.__ContentOnlyElement</code></b>:
243 <p class="indent-wrapped-lines"><b>Inherited from <code><a href="lxml.etree._Element-class.html" onclick="show_private();">_Element</a></code></b>:
244 <code><a href="lxml.etree._Element-class.html#base">base</a></code>,
245 <code><a href="lxml.etree._Element-class.html#nsmap">nsmap</a></code>,
246 <code><a href="lxml.etree._Element-class.html#prefix">prefix</a></code>,
247 <code><a href="lxml.etree._Element-class.html#sourceline">sourceline</a></code>,
248 <code><a href="lxml.etree._Element-class.html#tail">tail</a></code>
250 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
251 <code>__class__</code>
256 <!-- ==================== METHOD DETAILS ==================== -->
257 <a name="section-MethodDetails"></a>
258 <table class="details" border="1" cellpadding="3"
259 cellspacing="0" width="100%" bgcolor="white">
260 <tr bgcolor="#70b0f0" class="table-header">
261 <td colspan="2" class="table-header">
262 <table border="0" cellpadding="0" cellspacing="0" width="100%">
264 <td align="left"><span class="table-header">Method Details</span></td>
265 <td align="right" valign="top"
266 ><span class="options">[<a href="#section-MethodDetails"
267 class="privatelink" onclick="toggle_private();"
268 >hide private</a>]</span></td>
274 <a name="__init__"></a>
276 <table class="details" border="1" cellpadding="3"
277 cellspacing="0" width="100%" bgcolor="white">
279 <table width="100%" cellpadding="0" cellspacing="0" border="0">
280 <tr valign="top"><td>
281 <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">...</span>)</span>
282 <br /><em class="fname">(Constructor)</em>
284 </td><td align="right" valign="top"
289 x.__init__(...) initializes x; see help(type(x)) for signature
297 <a name="__new__"></a>
299 <table class="details" border="1" cellpadding="3"
300 cellspacing="0" width="100%" bgcolor="white">
302 <table width="100%" cellpadding="0" cellspacing="0" border="0">
303 <tr valign="top"><td>
304 <h3 class="epydoc"><span class="sig"><span class="sig-name">__new__</span>(<span class="sig-arg">T</span>,
305 <span class="sig-arg">S</span>,
306 <span class="sig-arg">...</span>)</span>
308 </td><td align="right" valign="top"
315 <dt>Returns: a new object with type S, a subtype of T</dt>
323 <!-- ==================== NAVIGATION BAR ==================== -->
324 <table class="navbar" border="0" width="100%" cellpadding="0"
325 bgcolor="#a0c0ff" cellspacing="0">
328 <th> <a
329 href="lxml-module.html">Home</a> </th>
332 <th> <a
333 href="module-tree.html">Trees</a> </th>
336 <th> <a
337 href="identifier-index.html">Indices</a> </th>
340 <th> <a
341 href="help.html">Help</a> </th>
343 <!-- Project homepage -->
344 <th class="navbar" align="right" width="100%">
345 <table border="0" cellpadding="0" cellspacing="0">
346 <tr><th class="navbar" align="center"
347 ><a class="navbar" target="_top" href="/">lxml API</a></th>
351 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
353 <td align="left" class="footer">
354 Generated by Epydoc 3.0.1
355 on Thu Jul 9 18:29:53 2020
357 <td align="right" class="footer">
358 <a target="mainFrame" href="http://epydoc.sourceforge.net"
359 >http://epydoc.sourceforge.net</a>
364 <script type="text/javascript">
366 // Private objects are initially displayed (because if
367 // javascript is turned off then we want them to be
368 // visible); but by default, we want to hide them. So hide
369 // them unless we have a cookie that says to show them.