摘要:
>>> 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)child1child2child3>>> root.insert(0, etree.Element("chil 阅读全文