(self, element=None, file=None)
| 527 | |
| 528 | """ |
| 529 | def __init__(self, element=None, file=None): |
| 530 | if element is not None and not iselement(element): |
| 531 | raise TypeError('expected an Element, not %s' % |
| 532 | type(element).__name__) |
| 533 | self._root = element # first node |
| 534 | if file: |
| 535 | self.parse(file) |
| 536 | |
| 537 | def getroot(self): |
| 538 | """Return root element of this tree.""" |