Package lxml :: Module etree :: Class ElementBase
[hide private]
[frames] | no frames]

Class ElementBase



object --+    
         |    
  _Element --+
             |
            ElementBase
Known Subclasses:
objectify.ObjectifiedElement, html.HtmlElement, tests.test_nsclasses.ETreeNamespaceClassesTestCase.bluff_class, tests.test_nsclasses.ETreeNamespaceClassesTestCase.default_class, tests.test_nsclasses.ETreeNamespaceClassesTestCase.maeh_class

All custom Element classes must inherit from this one.

Note that subclasses *must not* override __init__ or __new__ as it is absolutely undefined when these objects will be created or destroyed. All persistent state of Elements must be stored in the underlying XML. If you really need to initialize the object after creation, you can implement an ``_init(self)`` method that will be called after object creation.

Instance Methods [hide private]
 
__new__(T, S, ...)
Returns: a new object with type S, a subtype of T

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

Inherited from _Element (private): _init

Inherited from object: __delattr__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

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

Inherited from object: __class__

Method Details [hide private]

__new__(T, S, ...)

 
Returns:
a new object with type S, a subtype of T

Overrides: _Element.__new__