code: def readerForDoc(cur, URL, encoding, options):
      
      ret = libxml2mod.xmlReaderForDoc(cur, URL, encoding, options)
      if ret is None:raise treeError('xmlReaderForDoc() failed')
      return xmlTextReader(_obj=ret)
docs: Create an xmltextReader for an XML in-memory document. The
        parsing flags @options are a combination of xmlParserOption.