Home | Trees | Index | Help |
|
---|
Package lxml :: Module objectify :: Class ObjectifiedElement |
|
object
--+ |_Element
--+ |ElementBase
--+ | ObjectifiedElement
ObjectifiedDataElement
Main XML Element class.
Element children are accessed as object attributes. Multiple children with the same name are available through a list index. Example:
>>> root = etree.XML("<root><c1><c2>0</c2><c2>1</c2></c1></root>")
>>> second_c2 = root.c1.c2[1]
Method Summary | |
---|---|
x.__delattr__('name') <==> del x.name | |
x.__delitem__(y) <==> del x[y] | |
Use of negative indices is not supported. | |
x.__getattribute__('name') <==> x.name | |
x.__getitem__(y) <==> x[y] | |
Use of negative indices is not supported. | |
x.__iter__() <==> iter(x) | |
x.__len__() <==> len(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
x.__setattr__('name', value) <==> x.name = value | |
x.__setitem__(i, y) <==> x[i]=y | |
Use of negative indices is not supported. | |
x.__str__() <==> str(x) | |
Add a child value to the element. | |
Return the number of children of this element, regardless of their name. | |
Returns a list of object path expressions for all descendants. | |
find(...)
| |
findall(...)
| |
findtext(...)
| |
Inherited from object | |
x.__init__(...) initializes x; see x.__class__.__doc__ for signature | |
x.__hash__() <==> hash(x) | |
helper for pickle | |
helper for pickle |
Class Variable Summary | |
---|---|
getset_descriptor |
text = <attribute 'text' of 'lxml.objectify.ObjectifiedE...
|
Method Details |
---|
__delattr__(...)x.__delattr__('name') <==> del x.name
|
__delitem__(x,
y)
x.__delitem__(y) <==> del x[y]
|
__delslice__(x,
i,
j)
Use of negative indices is not supported.
|
__getattribute__(...)x.__getattribute__('name') <==> x.name
|
__getitem__(x,
y)
x.__getitem__(y) <==> x[y]
|
__getslice__(x,
i,
j)
Use of negative indices is not supported.
|
__iter__(x)x.__iter__() <==> iter(x)
|
__len__(x)
x.__len__() <==> len(x)
|
__new__(T, S, ...)T.__new__(S, ...) -> a new object with type S, a subtype of T
|
__setattr__(...)x.__setattr__('name', value) <==> x.name = value
|
__setitem__(x,
i,
y)
x.__setitem__(i, y) <==> x[i]=y
|
__setslice__(x,
i,
j,
y)
Use of negative indices is not supported.
|
__str__(x)
x.__str__() <==> str(x)
|
addattr(...)Add a child value to the element. As opposed to append(), it sets a data value, not an element. |
countchildren(...)Return the number of children of this element, regardless of their name. |
descendantpaths(...)Returns a list of object path expressions for all descendants. |
Class Variable Details |
---|
text
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sat Aug 18 12:44:27 2007 | http://epydoc.sf.net |