Exemple #1
0
def make_parser(parser_list=[]):
        return expatreader.create_parser()
Exemple #2
0
def make_parser(parser_list=[]):
        return expatreader.create_parser()
Exemple #3
0
 def parse(self, xmlfile, **kwargs):
     doc = self.module.parse(xmlfile,
                             parser=expatreader.create_parser(**kwargs),
                             **kwargs)
     return doc.toxml()
Exemple #4
0
 def parseString(self, xmlstring, **kwargs):
     doc = self.module.parseString(
         xmlstring, parser=expatreader.create_parser(**kwargs), **kwargs)
     return doc.toxml()
Exemple #5
0
import xml.sax.expatreader as bad
import defusedxml.expatreader as good

p = bad.create_parser()
b = good.create_parser()