def _traversePath(self,node,jid,set=0):
        """ Returns dictionary and key or None,None
            None - root node (w/o "node" attribute)
            /a/b/c - node
            /a/b/  - branch
            Set returns '' or None as the key
            get returns '' or None as the key or None as the dict.
            Used internally."""
        if self._handlers.has_key(jid): cur=self._handlers[jid]
        elif set:
            self._handlers[jid]={}
            cur=self._handlers[jid]
        else: cur=self._handlers['']
        if node is None: node=[None]
        else: node=node.replace('/',' /').split('/')
        for i in node:
            if i<>'' and cur.has_key(i): cur=cur[i]
            elif set and i<>'': cur[i]={dict:cur,str:i}; cur=cur[i]
            elif set or cur.has_key(''): return cur,''
            else: return None,None
        if cur.has_key(1) or set: return cur,1
        raise "Corrupted data"
 Returns dictionary and key or None,None
            None - root node (w/o "node" attribute)
            /a/b/c - node
            /a/b/  - branch
            Set returns '' or None as the key
            get returns '' or None as the key or None as the dict.
            Used internally.
chrome-cordova/gcmServer/xmpp/browser.py