def handle_starttag(self, tag, attrs): self.serial += 1 check_attribute_sanity(self.filename, attrs) self.print_banner_comment() self.output.write("<" + tag + x_xml.format_attrs(rewrite_attrs(attrs)) + ">") return
def xml(attrs={"version" : "1.0", "encoding" : "utf-8"}): return ("<?xml" + x_xml.format_attrs(attrs) + "?>")
def handle_startendtag(self, tag, attrs): self.output.write("<" + tag + x_xml.format_attrs(rewrite_attrs(attrs)) + " />") self.serial += 1 return