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