Package lxml :: Package html :: 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]
_fields__get(self) Dictionary-like object that represents all the fields in this form. | source code
_fields__set(self, value) | source code
_name(self) | source code
form_values(self) Return a list of tuples of the field values for the form. | source code
_action__get(self) Get/set the form's `action` attribute. | source code
_action__set(self, value) | source code
_action__del(self) | source code
_method__get(self) Get/set the form's method. | source code
_method__set(self, value) | source code
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`, `set`, `values`, `xpath` Inherited from `etree._Element` (private): `_init` Inherited from `HtmlMixin`: `cssselect`, `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 `HtmlMixin` (private): `_label__del`, `_label__get`, `_label__set` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__str__`

Properties | [hide private]
| inputs Returns an accessor for all the input elements in the form.
| fields Dictionary-like object that represents all the fields in this form.
| action Get/set the form's `action` attribute.
| method Get/set the form's method.
Inherited from `etree._Element`: `attrib`, `base`, `nsmap`, `prefix`, `sourceline`, `tag`, `tail`, `text` Inherited from `HtmlMixin`: `base_url`, `body`, `forms`, `head`, `label` Inherited from `object`: `__class__`

Method Details | [hide private]

### _fields__get(self) | source code
Dictionary-like object that represents all the fields in this form. You can set values in this dictionary to effect the form.

### form_values(self) | source code
Return a list of tuples of the field values for the form. This is suitable to be passed to `urllib.urlencode()`.

### _method__get(self) | source code
Get/set the form's method. Always returns a capitalized string, and defaults to `'GET'`

Property Details | [hide private]

### 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.

### 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: _fields__get(self) - Dictionary-like object that represents all the fields in this form. Set Method: _fields__set(self, value)

### action Get/set the form's `action` attribute. Get Method: _action__get(self) - Get/set the form's `action` attribute. Set Method: _action__set(self, value) Delete Method: _action__del(self)

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