Imported Upstream version 4.5.2
[platform/upstream/python-lxml.git] / doc / html / api / lxml.html.SelectElement-class.html
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">
5 <head>
6   <title>lxml.html.SelectElement</title>
7   <link rel="stylesheet" href="epydoc.css" type="text/css" />
8   <script type="text/javascript" src="epydoc.js"></script>
9 </head>
10
11 <body bgcolor="white" text="black" link="blue" vlink="#204080"
12       alink="#204080">
13 <!-- ==================== NAVIGATION BAR ==================== -->
14 <table class="navbar" border="0" width="100%" cellpadding="0"
15        bgcolor="#a0c0ff" cellspacing="0">
16   <tr valign="middle">
17   <!-- Home link -->
18       <th>&nbsp;&nbsp;&nbsp;<a
19         href="lxml-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
20
21   <!-- Tree link -->
22       <th>&nbsp;&nbsp;&nbsp;<a
23         href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
24
25   <!-- Index link -->
26       <th>&nbsp;&nbsp;&nbsp;<a
27         href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
28
29   <!-- Help link -->
30       <th>&nbsp;&nbsp;&nbsp;<a
31         href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
32
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>
38           </tr></table></th>
39   </tr>
40 </table>
41 <table width="100%" cellpadding="0" cellspacing="0">
42   <tr valign="top">
43     <td width="100%">
44       <span class="breadcrumbs">
45         lxml ::
46         html ::
47         SelectElement ::
48         Class&nbsp;SelectElement
49       </span>
50     </td>
51     <td>
52       <table cellpadding="0" cellspacing="0">
53         <!-- hide/show private -->
54         <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
55     onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
56         <tr><td align="right"><span class="options"
57             >[<a href="frames.html" target="_top">frames</a
58             >]&nbsp;|&nbsp;<a href="lxml.html.SelectElement-class.html"
59             target="_top">no&nbsp;frames</a>]</span></td></tr>
60       </table>
61     </td>
62   </tr>
63 </table>
64 <!-- ==================== CLASS DESCRIPTION ==================== -->
65 <h1 class="epydoc">Class SelectElement</h1><p class="nomargin-top"><span class="codelink"><a href="lxml.html-pysrc.html#SelectElement">source&nbsp;code</a></span></p>
66 <pre class="base-tree">
67             object --+    
68                      |    
69             <a href="lxml.html.InputMixin-class.html">InputMixin</a> --+
70                          |
71     object --+           |
72              |           |
73 <a href="lxml.etree._Element-class.html" onclick="show_private();">etree._Element</a> --+       |
74                  |       |
75  <a href="lxml.etree.ElementBase-class.html">etree.ElementBase</a> --+   |
76                      |   |
77         object --+   |   |
78                  |   |   |
79          <a href="lxml.html.HtmlMixin-class.html">HtmlMixin</a> --+   |
80                      |   |
81            <a href="lxml.html.HtmlElement-class.html">HtmlElement</a> --+
82                          |
83                         <strong class="uidshort">SelectElement</strong>
84 </pre>
85
86 <hr />
87 <p><tt class="rst-docutils literal">&lt;select&gt;</tt> element.  You can get the name with <tt class="rst-docutils literal">.name</tt>.</p>
88 <p><tt class="rst-docutils literal">.value</tt> will be the value of the selected option, unless this
89 is a multi-select element (<tt class="rst-docutils literal">&lt;select multiple&gt;</tt>), in which case
90 it will be a set-like object.  In either case <tt class="rst-docutils literal">.value_options</tt>
91 gives the possible values.</p>
92 <p>The boolean attribute <tt class="rst-docutils literal">.multiple</tt> shows if this is a
93 multi-select.</p>
94
95 <!-- ==================== INSTANCE METHODS ==================== -->
96 <a name="section-InstanceMethods"></a>
97 <table class="summary" border="1" cellpadding="3"
98        cellspacing="0" width="100%" bgcolor="white">
99 <tr bgcolor="#70b0f0" class="table-header">
100   <td colspan="2" class="table-header">
101     <table border="0" cellpadding="0" cellspacing="0" width="100%">
102       <tr valign="top">
103         <td align="left"><span class="table-header">Instance Methods</span></td>
104         <td align="right" valign="top"
105          ><span class="options">[<a href="#section-InstanceMethods"
106          class="privatelink" onclick="toggle_private();"
107          >hide private</a>]</span></td>
108       </tr>
109     </table>
110   </td>
111 </tr>
112   <tr>
113     <td colspan="2" class="summary">
114     <p class="indent-wrapped-lines"><b>Inherited from <code><a href="lxml.html.InputMixin-class.html">InputMixin</a></code></b>:
115       <code><a href="lxml.html.InputMixin-class.html#__repr__">__repr__</a></code>
116       </p>
117     <p class="indent-wrapped-lines"><b>Inherited from <code><a href="lxml.html.HtmlElement-class.html">HtmlElement</a></code></b>:
118       <code><a href="lxml.html.HtmlElement-class.html#cssselect">cssselect</a></code>,
119       <code><a href="lxml.html.HtmlElement-class.html#set">set</a></code>
120       </p>
121     <p class="indent-wrapped-lines"><b>Inherited from <code><a href="lxml.etree.ElementBase-class.html">etree.ElementBase</a></code></b>:
122       <code><a href="lxml.etree.ElementBase-class.html#__init__">__init__</a></code>,
123       <code><a href="lxml.etree.ElementBase-class.html#__new__">__new__</a></code>
124       </p>
125     <p class="indent-wrapped-lines"><b>Inherited from <code><a href="lxml.etree._Element-class.html" onclick="show_private();">etree._Element</a></code></b>:
126       <code><a href="lxml.etree._Element-class.html#__contains__">__contains__</a></code>,
127       <code><a href="lxml.etree._Element-class.html#__copy__">__copy__</a></code>,
128       <code><a href="lxml.etree._Element-class.html#__deepcopy__">__deepcopy__</a></code>,
129       <code><a href="lxml.etree._Element-class.html#__delitem__">__delitem__</a></code>,
130       <code><a href="lxml.etree._Element-class.html#__getitem__">__getitem__</a></code>,
131       <code><a href="lxml.etree._Element-class.html#__iter__">__iter__</a></code>,
132       <code><a href="lxml.etree._Element-class.html#__len__">__len__</a></code>,
133       <code><a href="lxml.etree._Element-class.html#__nonzero__">__nonzero__</a></code>,
134       <code><a href="lxml.etree._Element-class.html#__reversed__">__reversed__</a></code>,
135       <code><a href="lxml.etree._Element-class.html#__setitem__">__setitem__</a></code>,
136       <code><a href="lxml.etree._Element-class.html#addnext">addnext</a></code>,
137       <code><a href="lxml.etree._Element-class.html#addprevious">addprevious</a></code>,
138       <code><a href="lxml.etree._Element-class.html#append">append</a></code>,
139       <code><a href="lxml.etree._Element-class.html#clear">clear</a></code>,
140       <code><a href="lxml.etree._Element-class.html#extend">extend</a></code>,
141       <code><a href="lxml.etree._Element-class.html#find">find</a></code>,
142       <code><a href="lxml.etree._Element-class.html#findall">findall</a></code>,
143       <code><a href="lxml.etree._Element-class.html#findtext">findtext</a></code>,
144       <code><a href="lxml.etree._Element-class.html#get">get</a></code>,
145       <code><a href="lxml.etree._Element-class.html#getchildren">getchildren</a></code>,
146       <code><a href="lxml.etree._Element-class.html#getiterator">getiterator</a></code>,
147       <code><a href="lxml.etree._Element-class.html#getnext">getnext</a></code>,
148       <code><a href="lxml.etree._Element-class.html#getparent">getparent</a></code>,
149       <code><a href="lxml.etree._Element-class.html#getprevious">getprevious</a></code>,
150       <code><a href="lxml.etree._Element-class.html#getroottree">getroottree</a></code>,
151       <code><a href="lxml.etree._Element-class.html#index">index</a></code>,
152       <code><a href="lxml.etree._Element-class.html#insert">insert</a></code>,
153       <code><a href="lxml.etree._Element-class.html#items">items</a></code>,
154       <code><a href="lxml.etree._Element-class.html#iter">iter</a></code>,
155       <code><a href="lxml.etree._Element-class.html#iterancestors">iterancestors</a></code>,
156       <code><a href="lxml.etree._Element-class.html#iterchildren">iterchildren</a></code>,
157       <code><a href="lxml.etree._Element-class.html#iterdescendants">iterdescendants</a></code>,
158       <code><a href="lxml.etree._Element-class.html#iterfind">iterfind</a></code>,
159       <code><a href="lxml.etree._Element-class.html#itersiblings">itersiblings</a></code>,
160       <code><a href="lxml.etree._Element-class.html#itertext">itertext</a></code>,
161       <code><a href="lxml.etree._Element-class.html#keys">keys</a></code>,
162       <code><a href="lxml.etree._Element-class.html#makeelement">makeelement</a></code>,
163       <code><a href="lxml.etree._Element-class.html#remove">remove</a></code>,
164       <code><a href="lxml.etree._Element-class.html#replace">replace</a></code>,
165       <code><a href="lxml.etree._Element-class.html#values">values</a></code>,
166       <code><a href="lxml.etree._Element-class.html#xpath">xpath</a></code>
167       </p>
168     <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="lxml.etree._Element-class.html" onclick="show_private();">etree._Element</a></code></b> (private):
169       <code><a href="lxml.etree._Element-class.html#_init" onclick="show_private();">_init</a></code>
170       </p></div>
171     <p class="indent-wrapped-lines"><b>Inherited from <code><a href="lxml.html.HtmlMixin-class.html">HtmlMixin</a></code></b>:
172       <code><a href="lxml.html.HtmlMixin-class.html#drop_tag">drop_tag</a></code>,
173       <code><a href="lxml.html.HtmlMixin-class.html#drop_tree">drop_tree</a></code>,
174       <code><a href="lxml.html.HtmlMixin-class.html#find_class">find_class</a></code>,
175       <code><a href="lxml.html.HtmlMixin-class.html#find_rel_links">find_rel_links</a></code>,
176       <code><a href="lxml.html.HtmlMixin-class.html#get_element_by_id">get_element_by_id</a></code>,
177       <code><a href="lxml.html.HtmlMixin-class.html#iterlinks">iterlinks</a></code>,
178       <code><a href="lxml.html.HtmlMixin-class.html#make_links_absolute">make_links_absolute</a></code>,
179       <code><a href="lxml.html.HtmlMixin-class.html#resolve_base_href">resolve_base_href</a></code>,
180       <code><a href="lxml.html.HtmlMixin-class.html#rewrite_links">rewrite_links</a></code>,
181       <code><a href="lxml.html.HtmlMixin-class.html#text_content">text_content</a></code>
182       </p>
183     <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
184       <code>__delattr__</code>,
185       <code>__format__</code>,
186       <code>__getattribute__</code>,
187       <code>__hash__</code>,
188       <code>__reduce__</code>,
189       <code>__reduce_ex__</code>,
190       <code>__setattr__</code>,
191       <code>__sizeof__</code>,
192       <code>__str__</code>,
193       <code>__subclasshook__</code>
194       </p>
195     </td>
196   </tr>
197 </table>
198 <!-- ==================== PROPERTIES ==================== -->
199 <a name="section-Properties"></a>
200 <table class="summary" border="1" cellpadding="3"
201        cellspacing="0" width="100%" bgcolor="white">
202 <tr bgcolor="#70b0f0" class="table-header">
203   <td colspan="2" class="table-header">
204     <table border="0" cellpadding="0" cellspacing="0" width="100%">
205       <tr valign="top">
206         <td align="left"><span class="table-header">Properties</span></td>
207         <td align="right" valign="top"
208          ><span class="options">[<a href="#section-Properties"
209          class="privatelink" onclick="toggle_private();"
210          >hide private</a>]</span></td>
211       </tr>
212     </table>
213   </td>
214 </tr>
215 <tr>
216     <td width="15%" align="right" valign="top" class="summary">
217       <span class="summary-type">&nbsp;</span>
218     </td><td class="summary">
219         <a href="lxml.html.SelectElement-class.html#multiple" class="summary-name">multiple</a><br />
220       Boolean attribute: is there a <tt class="rst-docutils literal">multiple</tt> attribute on this element.
221     </td>
222   </tr>
223 <tr>
224     <td width="15%" align="right" valign="top" class="summary">
225       <span class="summary-type">&nbsp;</span>
226     </td><td class="summary">
227         <a href="lxml.html.SelectElement-class.html#value" class="summary-name">value</a><br />
228       Get/set the value of this select (the selected option).
229     </td>
230   </tr>
231 <tr>
232     <td width="15%" align="right" valign="top" class="summary">
233       <span class="summary-type">&nbsp;</span>
234     </td><td class="summary">
235         <a href="lxml.html.SelectElement-class.html#value_options" class="summary-name">value_options</a><br />
236       All the possible values this select can have (the <tt class="rst-docutils literal">value</tt>
237 attribute of all the <tt class="rst-docutils literal">&lt;option&gt;</tt> elements.
238     </td>
239   </tr>
240   <tr>
241     <td colspan="2" class="summary">
242     <p class="indent-wrapped-lines"><b>Inherited from <code><a href="lxml.html.InputMixin-class.html">InputMixin</a></code></b>:
243       <code><a href="lxml.html.InputMixin-class.html#name">name</a></code>
244       </p>
245     <p class="indent-wrapped-lines"><b>Inherited from <code><a href="lxml.etree._Element-class.html" onclick="show_private();">etree._Element</a></code></b>:
246       <code><a href="lxml.etree._Element-class.html#attrib">attrib</a></code>,
247       <code><a href="lxml.etree._Element-class.html#base">base</a></code>,
248       <code><a href="lxml.etree._Element-class.html#nsmap">nsmap</a></code>,
249       <code><a href="lxml.etree._Element-class.html#prefix">prefix</a></code>,
250       <code><a href="lxml.etree._Element-class.html#sourceline">sourceline</a></code>,
251       <code><a href="lxml.etree._Element-class.html#tag">tag</a></code>,
252       <code><a href="lxml.etree._Element-class.html#tail">tail</a></code>,
253       <code><a href="lxml.etree._Element-class.html#text">text</a></code>
254       </p>
255     <p class="indent-wrapped-lines"><b>Inherited from <code><a href="lxml.html.HtmlMixin-class.html">HtmlMixin</a></code></b>:
256       <code><a href="lxml.html.HtmlMixin-class.html#base_url">base_url</a></code>,
257       <code><a href="lxml.html.HtmlMixin-class.html#body">body</a></code>,
258       <code><a href="lxml.html.HtmlMixin-class.html#classes">classes</a></code>,
259       <code><a href="lxml.html.HtmlMixin-class.html#forms">forms</a></code>,
260       <code><a href="lxml.html.HtmlMixin-class.html#head">head</a></code>,
261       <code><a href="lxml.html.HtmlMixin-class.html#label">label</a></code>
262       </p>
263     <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
264       <code>__class__</code>
265       </p>
266     </td>
267   </tr>
268 </table>
269 <!-- ==================== PROPERTY DETAILS ==================== -->
270 <a name="section-PropertyDetails"></a>
271 <table class="details" border="1" cellpadding="3"
272        cellspacing="0" width="100%" bgcolor="white">
273 <tr bgcolor="#70b0f0" class="table-header">
274   <td colspan="2" class="table-header">
275     <table border="0" cellpadding="0" cellspacing="0" width="100%">
276       <tr valign="top">
277         <td align="left"><span class="table-header">Property Details</span></td>
278         <td align="right" valign="top"
279          ><span class="options">[<a href="#section-PropertyDetails"
280          class="privatelink" onclick="toggle_private();"
281          >hide private</a>]</span></td>
282       </tr>
283     </table>
284   </td>
285 </tr>
286 </table>
287 <a name="multiple"></a>
288 <div>
289 <table class="details" border="1" cellpadding="3"
290        cellspacing="0" width="100%" bgcolor="white">
291 <tr><td>
292   <h3 class="epydoc">multiple</h3>
293   Boolean attribute: is there a <tt class="rst-docutils literal">multiple</tt> attribute on this element.
294   <dl class="fields">
295     <dt>Get Method:</dt>
296     <dd class="value"><span class="summary-sig"><i>unreachable</i>.multiple(<span class="summary-sig-arg">self</span>)</span>
297         - Boolean attribute: is there a <tt class="rst-docutils literal">multiple</tt> attribute on this element.
298     </dd>
299     <dt>Set Method:</dt>
300     <dd class="value"><span class="summary-sig"><i>unreachable</i>.multiple(<span class="summary-sig-arg">self</span>,
301         <span class="summary-sig-arg">value</span>)</span>
302     </dd>
303   </dl>
304 </td></tr></table>
305 </div>
306 <a name="value"></a>
307 <div>
308 <table class="details" border="1" cellpadding="3"
309        cellspacing="0" width="100%" bgcolor="white">
310 <tr><td>
311   <h3 class="epydoc">value</h3>
312   <p>Get/set the value of this select (the selected option).</p>
313 <p>If this is a multi-select, this is a set-like object that
314 represents all the selected options.</p>
315   <dl class="fields">
316     <dt>Get Method:</dt>
317     <dd class="value"><span class="summary-sig"><i>unreachable</i>.value(<span class="summary-sig-arg">self</span>)</span>
318         - Get/set the value of this select (the selected option).
319     </dd>
320     <dt>Set Method:</dt>
321     <dd class="value"><span class="summary-sig"><i>unreachable</i>.value(<span class="summary-sig-arg">self</span>,
322         <span class="summary-sig-arg">value</span>)</span>
323     </dd>
324     <dt>Delete Method:</dt>
325     <dd class="value"><span class="summary-sig"><i>unreachable</i>.value(<span class="summary-sig-arg">self</span>)</span>
326     </dd>
327   </dl>
328 </td></tr></table>
329 </div>
330 <a name="value_options"></a>
331 <div>
332 <table class="details" border="1" cellpadding="3"
333        cellspacing="0" width="100%" bgcolor="white">
334 <tr><td>
335   <h3 class="epydoc">value_options</h3>
336   All the possible values this select can have (the <tt class="rst-docutils literal">value</tt>
337 attribute of all the <tt class="rst-docutils literal">&lt;option&gt;</tt> elements.
338   <dl class="fields">
339     <dt>Get Method:</dt>
340     <dd class="value"><span class="summary-sig"><i>unreachable</i>.value_options(<span class="summary-sig-arg">self</span>)</span>
341         - All the possible values this select can have (the <tt class="rst-docutils literal">value</tt>
342 attribute of all the <tt class="rst-docutils literal">&lt;option&gt;</tt> elements.
343     </dd>
344   </dl>
345 </td></tr></table>
346 </div>
347 <br />
348 <!-- ==================== NAVIGATION BAR ==================== -->
349 <table class="navbar" border="0" width="100%" cellpadding="0"
350        bgcolor="#a0c0ff" cellspacing="0">
351   <tr valign="middle">
352   <!-- Home link -->
353       <th>&nbsp;&nbsp;&nbsp;<a
354         href="lxml-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
355
356   <!-- Tree link -->
357       <th>&nbsp;&nbsp;&nbsp;<a
358         href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
359
360   <!-- Index link -->
361       <th>&nbsp;&nbsp;&nbsp;<a
362         href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
363
364   <!-- Help link -->
365       <th>&nbsp;&nbsp;&nbsp;<a
366         href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
367
368   <!-- Project homepage -->
369       <th class="navbar" align="right" width="100%">
370         <table border="0" cellpadding="0" cellspacing="0">
371           <tr><th class="navbar" align="center"
372             ><a class="navbar" target="_top" href="/">lxml API</a></th>
373           </tr></table></th>
374   </tr>
375 </table>
376 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
377   <tr>
378     <td align="left" class="footer">
379     Generated by Epydoc 3.0.1
380     on Thu Jul  9 18:29:53 2020
381     </td>
382     <td align="right" class="footer">
383       <a target="mainFrame" href="http://epydoc.sourceforge.net"
384         >http://epydoc.sourceforge.net</a>
385     </td>
386   </tr>
387 </table>
388
389 <script type="text/javascript">
390   <!--
391   // Private objects are initially displayed (because if
392   // javascript is turned off then we want them to be
393   // visible); but by default, we want to hide them.  So hide
394   // them unless we have a cookie that says to show them.
395   checkCookie();
396   // -->
397 </script>
398 </body>
399 </html>