Home | Trees | Indices | Help |
|
---|
|
object --+ | etree._Element --+ | etree.ElementBase --+ | ObjectifiedElement
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]
Note that you cannot (and must not) instantiate this class or its subclasses.
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
a new object with type S, a subtype of T |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
Properties | |
text Text before the first subelement. |
|
Inherited from Inherited from |
Method Details |
|
|
|
|
Return a sibling, counting from the first child of the parent. The method behaves like both a dict and a sequence.
|
|
|
|
|
|
|
Add a child value to the element. As opposed to append(), it sets a data value, not an element. |
|
|
|
|
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0 on Fri Dec 12 22:47:01 2008 | http://epydoc.sourceforge.net |