(file, parser=None, bufsize=None)
Parse a file into a DOM by filename or file object.
Parse a file into a DOM by filename or file object.
Parse a file into a DOM by filename or file object .
def parse(file, parser=None, bufsize=None):
    """Parse a file into a DOM by filename or file object."""
    if parser is None and not bufsize:
        from xml.dom import expatbuilder
        return expatbuilder.parse(file)
    else:
        from xml.dom import pulldom
        return _do_pulldom_parse(pulldom.parse, (file,),
            {'parser': parser, 'bufsize': bufsize})
def parse ( file , parser = None , bufsize = None ) : if parser is None and not bufsize : from xml . dom import expatbuilder return expatbuilder . parse ( file ) else : from xml . dom import pulldom return _do_pulldom_parse ( pulldom . parse , ( file , ) , { 'parser' : parser , 'bufsize' : bufsize } )