>>> child = root[0]
>>> print(child.tag)
child1
>>> print(len(root))
3
>>> root.index(root[1]) # lxml.etree only!
1
>>> children = list(root)
>>> for child in root:
... print(child.tag)
child1
child2
child3
>>> root.insert(0, etree.Element("child0"))
>>> start = root[:1]
>>> end = root[-1:]
>>> print(start[0].tag)
child0
>>> print(end[0].tag)
child3
>>> child = root[0]
>>> print(child.tag)
ch