def start(self, name, attributes={}, newline=True): attrs = AttributesImpl() for attrname, attrvalue in attributes.items(): attrs.addAttribute('', '', attrname, '', attrvalue) self._writer.startElement('', '', name, attrs) if newline: self.content('\n')
def _get_attrs_impl(self, attrs): ai = AttributesImpl() for name, value in attrs.items(): ai.addAttribute("", "", name, "", value) return ai