def make_parser(parser_list=[]): return expatreader.create_parser()
def parse(self, xmlfile, **kwargs): doc = self.module.parse(xmlfile, parser=expatreader.create_parser(**kwargs), **kwargs) return doc.toxml()
def parseString(self, xmlstring, **kwargs): doc = self.module.parseString( xmlstring, parser=expatreader.create_parser(**kwargs), **kwargs) return doc.toxml()
import xml.sax.expatreader as bad import defusedxml.expatreader as good p = bad.create_parser() b = good.create_parser()