lxml.objectify.StringElement

Package lxml :: Module objectify :: Class StringElement |
[frames] | no frames]

# Class StringElement

        object --+
                 |
    etree._Element --+
                     |
     etree.ElementBase --+
                         |
        ObjectifiedElement --+
                             |
        ObjectifiedDataElement --+
                                 |
                                StringElement

String data class.

Note that this class does not support the sequence protocol of strings: len(), iter(), str_attr[0], str_attr[0:1], etc. are not supported. Instead, use the .text attribute to get a 'real' string.

Instance Methods
__add__(...) |
__eq__(x, y) x==y |
__ge__(x, y) x>=y |
__gt__(x, y) x>y |
__le__(x, y) x<=y |
__lt__(x, y) x<y |
__mod__(...) |
__mul__(...) |
__ne__(x, y) x!=y |
a new object with type S, a subtype of T |
__new__(T, S, ...) |
__nonzero__(x) x != 0 |
__radd__(x, y) y+x |
__repr__(self) repr(x) |
__rmod__(x, y) y%x |
__rmul__(x, y) y*x |
strlen(...) |
Inherited from `ObjectifiedDataElement`: `__str__` Inherited from `ObjectifiedElement`: `__delattr__`, `__delitem__`, `__getattr__`, `__getattribute__`, `__getitem__`, `__iter__`, `__len__`, `__setattr__`, `__setitem__`, `addattr`, `countchildren`, `descendantpaths`, `find`, `findall`, `findtext`, `getchildren`, `iterfind` Inherited from `etree._Element`: `__contains__`, `__copy__`, `__deepcopy__`, `__reversed__`, `addnext`, `addprevious`, `append`, `clear`, `extend`, `get`, `getiterator`, `getnext`, `getparent`, `getprevious`, `getroottree`, `index`, `insert`, `items`, `iter`, `iterancestors`, `iterchildren`, `iterdescendants`, `itersiblings`, `itertext`, `keys`, `makeelement`, `remove`, `replace`, `set`, `values`, `xpath` Inherited from `object`: `__hash__`, `__init__`, `__reduce__`, `__reduce_ex__`

Properties
| pyval
Inherited from `ObjectifiedElement`: `text` Inherited from `etree._Element`: `attrib`, `nsmap`, `prefix`, `sourceline`, `tag`, `tail` Inherited from `object`: `__class__`

Method Details

### __new__(T, S, ...) |
Returns: a new object with type S, a subtype of T Overrides: object.__new__

### __nonzero__(x) (Boolean test operator) |
x != 0 Overrides: etree._Element.__nonzero__

### __repr__(self) (Representation operator) |
repr(x) Overrides: object.__repr__ (inherited documentation)