(self)
| 1442 | return self._root |
| 1443 | |
| 1444 | def _flush(self): |
| 1445 | if self._data: |
| 1446 | if self._last is not None: |
| 1447 | text = "".join(self._data) |
| 1448 | if self._tail: |
| 1449 | assert self._last.tail is None, "internal error (tail)" |
| 1450 | self._last.tail = text |
| 1451 | else: |
| 1452 | assert self._last.text is None, "internal error (text)" |
| 1453 | self._last.text = text |
| 1454 | self._data = [] |
| 1455 | |
| 1456 | def data(self, data): |
| 1457 | """Add text to current element.""" |
no test coverage detected