Package lxml :: Package html :: Class InputGetter
[show private | hide private]
[frames | no frames]

Type InputGetter

object --+
         |
        InputGetter


An accessor that represents all the input fields in a form.

You can get fields by name from this, with ``form.inputs['field_name']``. If there are a set of checkboxes with the same name, they are returned as a list (a `CheckboxGroup` which also allows value setting). Radio inputs are handled similarly.

You can also iterate over this to get all input elements. This won't return the same thing as if you get all the names, as checkboxes and radio elements are returned individually.
Method Summary
  __init__(self, form)
  __contains__(self, name)
  __getitem__(self, name)
  __iter__(self)
  __repr__(self)
  keys(self)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
XPath _all_xpath = .//*[name() = 'select' or name() = 'input' ...
XPath _name_xpath = .//*[@name = $name and (name(.) = 'select'...

Class Variable Details

_all_xpath

Type:
XPath
Value:
.//*[name() = 'select' or name() = 'input' or name() = 'textarea']     

_name_xpath

Type:
XPath
Value:
.//*[@name = $name and (name(.) = 'select' or name(.) = 'input' or nam\
e(.) = 'textarea')]                                                    

Generated by Epydoc 2.1 on Sat Aug 18 12:44:28 2007 http://epydoc.sf.net