Package lxml :: Module pyclasslookup :: Class PythonElementClassLookup
[show private | hide private]
[frames | no frames]

Type PythonElementClassLookup

            object --+        
                     |        
    ElementClassLookup --+    
                         |    
FallbackElementClassLookup --+
                             |
                            PythonElementClassLookup


Element class lookup based on a subclass method.

To use it, inherit from this class and override the method

    lookup(self, document, node_proxy)

to lookup the element class for a node. The first argument is the opaque
document instance that contains the Element. The second arguments is a
lightweight Element proxy implementation that is only valid during the
lookup. Do not try to keep a reference to it. Once the lookup is done, the
proxy will be invalid.

If you return None from this method, the fallback will be called.

Method Summary
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  lookup(...)
    Inherited from FallbackElementClassLookup
  setFallback(...)
Sets the fallback scheme for this lookup method.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
    Inherited from FallbackElementClassLookup
PyCObject __pyx_vtable__ = <PyCObject object at 0x401cb650>
member_descriptor fallback = <member 'fallback' of 'lxml.etree.FallbackEle...

Method Details

__init__(...)
(Constructor)

x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides:
lxml.etree.FallbackElementClassLookup.__init__

__new__(T, S, ...)

T.__new__(S, ...) -> a new object with type S, a subtype of T
Returns:
a new object with type S, a subtype of T
Overrides:
lxml.etree.FallbackElementClassLookup.__new__

Generated by Epydoc 2.1 on Fri Aug 17 13:52:29 2007 http://epydoc.sf.net