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.html.SelectElement</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">
48 Class SelectElement
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 private</a>]</span></td></tr>
56 <tr><td align="right"><span class="options"
57 >[<a href="frames.html" target="_top">frames</a
58 >] | <a href="lxml.html.SelectElement-class.html"
59 target="_top">no frames</a>]</span></td></tr>
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 code</a></span></p>
66 <pre class="base-tree">
69 <a href="lxml.html.InputMixin-class.html">InputMixin</a> --+
73 <a href="lxml.etree._Element-class.html" onclick="show_private();">etree._Element</a> --+ |
75 <a href="lxml.etree.ElementBase-class.html">etree.ElementBase</a> --+ |
79 <a href="lxml.html.HtmlMixin-class.html">HtmlMixin</a> --+ |
81 <a href="lxml.html.HtmlElement-class.html">HtmlElement</a> --+
83 <strong class="uidshort">SelectElement</strong>
87 <p><tt class="rst-docutils literal"><select></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"><select multiple></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
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%">
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>
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>
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>
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>
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>
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>
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>
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>
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%">
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>
216 <td width="15%" align="right" valign="top" class="summary">
217 <span class="summary-type"> </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.
224 <td width="15%" align="right" valign="top" class="summary">
225 <span class="summary-type"> </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).
232 <td width="15%" align="right" valign="top" class="summary">
233 <span class="summary-type"> </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"><option></tt> elements.
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>
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>
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>
263 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
264 <code>__class__</code>
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%">
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>
287 <a name="multiple"></a>
289 <table class="details" border="1" cellpadding="3"
290 cellspacing="0" width="100%" bgcolor="white">
292 <h3 class="epydoc">multiple</h3>
293 Boolean attribute: is there a <tt class="rst-docutils literal">multiple</tt> attribute on this element.
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.
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>
308 <table class="details" border="1" cellpadding="3"
309 cellspacing="0" width="100%" bgcolor="white">
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>
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).
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>
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>
330 <a name="value_options"></a>
332 <table class="details" border="1" cellpadding="3"
333 cellspacing="0" width="100%" bgcolor="white">
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"><option></tt> elements.
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"><option></tt> elements.
348 <!-- ==================== NAVIGATION BAR ==================== -->
349 <table class="navbar" border="0" width="100%" cellpadding="0"
350 bgcolor="#a0c0ff" cellspacing="0">
353 <th> <a
354 href="lxml-module.html">Home</a> </th>
357 <th> <a
358 href="module-tree.html">Trees</a> </th>
361 <th> <a
362 href="identifier-index.html">Indices</a> </th>
365 <th> <a
366 href="help.html">Help</a> </th>
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>
376 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
378 <td align="left" class="footer">
379 Generated by Epydoc 3.0.1
380 on Thu Jul 9 18:29:53 2020
382 <td align="right" class="footer">
383 <a target="mainFrame" href="http://epydoc.sourceforge.net"
384 >http://epydoc.sourceforge.net</a>
389 <script type="text/javascript">
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.