lxml :: html :: FormElement :: Class FormElement
[hide private]
[frames] | no frames]

Class FormElement

source code

    object --+            
             |            
etree._Element --+        
                 |        
 etree.ElementBase --+    
                     |    
        object --+   |    
                 |   |    
         HtmlMixin --+    
                     |    
           HtmlElement --+
                         |
                        FormElement

Represents a <form> element.
Instance Methods [hide private]
 
_name(self) source code
 
form_values(self)
Return a list of tuples of the field values for the form. This is suitable to be passed to urllib.urlencode().
source code

Inherited from HtmlElement: cssselect, set

Inherited from etree.ElementBase: __init__, __new__

Inherited from etree._Element: __contains__, __copy__, __deepcopy__, __delitem__, __getitem__, __iter__, __len__, __nonzero__, __repr__, __reversed__, __setitem__, addnext, addprevious, append, clear, extend, find, findall, findtext, get, getchildren, getiterator, getnext, getparent, getprevious, getroottree, index, insert, items, iter, iterancestors, iterchildren, iterdescendants, iterfind, itersiblings, itertext, keys, makeelement, remove, replace, values, xpath

Inherited from etree._Element (private): _init

Inherited from HtmlMixin: drop_tag, drop_tree, find_class, find_rel_links, get_element_by_id, iterlinks, make_links_absolute, resolve_base_href, rewrite_links, text_content

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  action
Get/set the form's action attribute.
  fields
Dictionary-like object that represents all the fields in this form. You can set values in this dictionary to effect the form.
  inputs
Returns an accessor for all the input elements in the form.
  method
Get/set the form's method. Always returns a capitalized string, and defaults to 'GET'

Inherited from etree._Element: attrib, base, nsmap, prefix, sourceline, tag, tail, text

Inherited from HtmlMixin: base_url, body, classes, forms, head, label

Inherited from object: __class__

Property Details [hide private]

action

Get/set the form's action attribute.
Get Method:
unreachable.action(self) - Get/set the form's action attribute.
Set Method:
unreachable.action(self, value)
Delete Method:
unreachable.action(self)

fields

Dictionary-like object that represents all the fields in this form. You can set values in this dictionary to effect the form.
Get Method:
unreachable.fields(self) - Dictionary-like object that represents all the fields in this form. You can set values in this dictionary to effect the form.
Set Method:
unreachable.fields(self, value)

inputs

Returns an accessor for all the input elements in the form.

See InputGetter for more information about the object.

Get Method:
unreachable.inputs(self) - Returns an accessor for all the input elements in the form.

method

Get/set the form's method. Always returns a capitalized string, and defaults to 'GET'
Get Method:
unreachable.method(self) - Get/set the form's method. Always returns a capitalized string, and defaults to 'GET'
Set Method:
unreachable.method(self, value)