Create a progressive XML parser context to build either an
      event flow if the SAX object is not None, or a DOM tree
       otherwise.

def createPushParser(SAX, chunk, size, URI):
    """Create a progressive XML parser context to build either an
      event flow if the SAX object is not None, or a DOM tree
       otherwise. """
    ret = libxml2mod.xmlCreatePushParser(SAX, chunk, size, URI)
    if ret is None:raise parserError('xmlCreatePushParser() failed')
    return parserCtxt(_obj=ret)