Create an xmltextReader for an XML in-memory document. The
      parsing flags @options are a combination of xmlParserOption.

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