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

Class __ContentOnlyElement

object --+    
         |    
  _Element --+
             |
            __ContentOnlyElement
Known Subclasses:

Instance Methods [hide private]
 
__delitem__(x, y)
del x[y]
 
__getitem__(self, x)
Returns the subelement at the given position or the requested slice.
 
__len__(self)
Returns the number of subelements.
a new object with type S, a subtype of T
__new__(T, S, ...)
 
__setitem__(self, index, value)
Replaces the given subelement index or slice.
 
append(self, value)
Adds a subelement to the end of this element.
 
get(self, key, default=None)
Gets an element attribute.
 
insert(self, index, value)
Inserts a subelement at the given position in this element
 
items(self)
Gets element attributes, as a sequence. The attributes are returned in an arbitrary order.
 
keys(self)
Gets a list of attribute names. The names are returned in an arbitrary order (just like for an ordinary Python dictionary).
 
set(self, key, value)
Sets an element attribute.
 
values(self)
Gets element attribute values as a sequence of strings. The attributes are returned in an arbitrary order.

Inherited from _Element: __contains__, __copy__, __deepcopy__, __iter__, __nonzero__, __repr__, __reversed__, addnext, addprevious, clear, extend, find, findall, findtext, getchildren, getiterator, getnext, getparent, getprevious, getroottree, index, iter, iterancestors, iterchildren, iterdescendants, iterfind, itersiblings, itertext, makeelement, remove, replace, xpath

Inherited from _Element (private): _init

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

Properties [hide private]
  attrib
Element attribute dictionary. Where possible, use get(), set(), keys(), values() and items() to access element attributes.
  text
Text before the first subelement. This is either a string or the value None, if there was no text.

Inherited from _Element: base, nsmap, prefix, sourceline, tag, tail

Inherited from object: __class__

Method Details [hide private]

__delitem__(x, y)
(Index deletion operator)

 
del x[y]
Overrides: _Element.__delitem__

__getitem__(self, x)
(Indexing operator)

 
Returns the subelement at the given position or the requested slice.
Overrides: _Element.__getitem__

__len__(self)
(Length operator)

 
Returns the number of subelements.
Overrides: _Element.__len__

__new__(T, S, ...)

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

__setitem__(self, index, value)
(Index assignment operator)

 
Replaces the given subelement index or slice.
Overrides: _Element.__setitem__

append(self, value)

 
Adds a subelement to the end of this element.
Overrides: _Element.append

get(self, key, default=None)

 
Gets an element attribute.
Overrides: _Element.get

insert(self, index, value)

 
Inserts a subelement at the given position in this element
Overrides: _Element.insert

items(self)

 
Gets element attributes, as a sequence. The attributes are returned in an arbitrary order.
Overrides: _Element.items

keys(self)

 
Gets a list of attribute names. The names are returned in an arbitrary order (just like for an ordinary Python dictionary).
Overrides: _Element.keys

set(self, key, value)

 
Sets an element attribute.
Overrides: _Element.set

values(self)

 
Gets element attribute values as a sequence of strings. The attributes are returned in an arbitrary order.
Overrides: _Element.values