def __init__(self, text = None, elements = None, document = None, 
                 namespace = None, prefix=None, namespaces_map={}):
        self.__namespaces_map = namespaces_map
        _rx = "|".join(namespaces_map.keys()) # {'external': 'ext', 'model': 'mod'} -> 'external|model'
        self.__ns_rx = re.compile(r"^(%s):.*$" % _rx) # And now we build an expression ^(external|model):.*$
                                                      # to find prefixes in all xml nodes i.e.: <model:code>1</model:code>
                                                      # and later change that to <mod:code>1</mod:code>
        self.__ns = namespace
        self.__prefix = prefix
        
        if text is not None:
            try:
                self.__document = xml.dom.minidom.parseString(text)
            except:
                log.error(text)
                raise
            self.__elements = [self.__document.documentElement]
        else:
            self.__elements = elements
            self.__document = document
:param namespaces_map: How to map our namespace prefix to that given by the client;
dataset/ETHPy150Open uwdata/termite-visualizations/web2py/gluon/contrib/pysimplesoap/simplexml.py/SimpleXMLElement.__init__