| 1653 | return self.target.end_ns(prefix or '') |
| 1654 | |
| 1655 | def _start(self, tag, attr_list): |
| 1656 | # Handler for expat's StartElementHandler. Since ordered_attributes |
| 1657 | # is set, the attributes are reported as a list of alternating |
| 1658 | # attribute name,value. |
| 1659 | fixname = self._fixname |
| 1660 | tag = fixname(tag) |
| 1661 | attrib = {} |
| 1662 | if attr_list: |
| 1663 | for i in range(0, len(attr_list), 2): |
| 1664 | attrib[fixname(attr_list[i])] = attr_list[i+1] |
| 1665 | return self.target.start(tag, attrib) |
| 1666 | |
| 1667 | def _end(self, tag): |
| 1668 | return self.target.end(self._fixname(tag)) |