code: def createDocParserCtxt(cur):
      
      ret = libxml2mod.xmlCreateDocParserCtxt(cur)
      if ret is None:raise parserError('xmlCreateDocParserCtxt() failed')
      return parserCtxt(_obj=ret)
docs: Creates a parser context for an XML in-memory document.